-
PHP mail HELP...please
This is DRIVING ME NUTS!!! I finally made the switch from Swish to Flash, thanks to a great (old) book called foundation Flash 5. The movie works great! My forum USED to work on PHP4 but now I am on a server running PHP5. Now my form doesn't work
I have a very simple form. 3 text blocks with vars of fullname, email, and message.
This is the code for my send button
Code:
on (release)
{
if (fullname eq "" || email eq "" || message eq "")
{
stop ();
}
else
{
loadVariablesNum("/form.php", 0, "POST");
gotoAndStop(50);
} // end else if
}
This is the code to my form.php
Code:
<?php
$fullname=$_GET['fullname'];
$email=$_GET['email'];
$message=$_GET['message'];
$to="support@weather4powerpoint.com";
$subject="Contact Form from Wx4PPT";
mail($to,$subject,$message,"From: Weather 4 PowerPoint Contact Page\nReply-To: $email\n");
?>
When I get the email I get the subject, from and to.. NOTHING in the body of the email??? if you can help I will GREATLY appreciate it!
The site with the form is, if you have not already noticed http://www.weather4powerpoint.com chose flash and click contact in the menu.
Thank you for any help that you can offer.
Do you like Weather? Then check out WxChat.com
If you want what the crazy Philippians got, then you need to do what the crazy Philippians did!
-
FK'n_dog
try using -
$fullname=$_POST['fullname'];
etc..etc
-
that works but it only sends the message not the email or the fullname.. I have tried this
Code:
<?php
$fullname=$_POST['fullname'];
$email=$_POST['email'];
$message=$_POST['message'];
$to="support@weather4powerpoint.com";
$subject="Contact Form from Wx4PPT";
mail($to,$subject,$fullname,$email,$message,"From: Weather 4 PowerPoint Contact Page\nReply-To: $email\n");
?>
the form will not even send.. so I removed $fullname and $email tested and it sent $message.. so I renamed $message to $email and it sent.. can you show me the best way to send fullname, email, and message within the body?
Thank you again for your help!
Do you like Weather? Then check out WxChat.com
If you want what the crazy Philippians got, then you need to do what the crazy Philippians did!
-
FK'n_dog
1. what version of Flash are you using ?
2. are you certain that your variable names for the textfields are correct ?
-
Using Flash MX
text fields are (fullname, email, message) and they are all set to input text fields.
Do you like Weather? Then check out WxChat.com
If you want what the crazy Philippians got, then you need to do what the crazy Philippians did!
-
FK'n_dog
try using loadvars -
Code:
// button code -
on (release){
if (fullname eq "" || email eq "" || message eq "") {
stop ();
} else {
_root.sendMail();
gotoAndStop(50);
} // end else if
}
Code:
// code on frame with textfields (variable names)
function sendMail(){
lv = new LoadVars();
lv.fullname = _root.fullname;
lv.email = _root.email;
lv.message = _root.message;
lv.onLoad = function(){
trace(unescape(this));
}; // end onLoad
lv.sendAndLoad("full path to php", lv, "POST");
} // end sendMail
send some feedback from your php to see if the variables are received
echo "&mailVar=".$email."&";
this will show in your output window as a result of the onLoad function
-
confused as to where to add the second code? they are layer 13,14 and 15.. can you heads up how I would add this?
thanks your help is GREATLY appreciated!
If you need I can upload the FLA to my server
Do you like Weather? Then check out WxChat.com
If you want what the crazy Philippians got, then you need to do what the crazy Philippians did!
-
FK'n_dog
where to add the second code
on the frame number that covers the textfields
ie .. textfields on frame#1, layers 13, 14, 15
code on frame#1, layer 12
-
I did that and got no email?
I will PM you the addy for the FLA and form.. if you can look at it that would be great.. thank you agian
Do you like Weather? Then check out WxChat.com
If you want what the crazy Philippians got, then you need to do what the crazy Philippians did!
-
nm here is the link.. it wont let me email you
http://www.weather4powerpoint.com/wx4ppt.zip
it contains the form and the FLA
Do you like Weather? Then check out WxChat.com
If you want what the crazy Philippians got, then you need to do what the crazy Philippians did!
-
FK'n_dog
altered your file and sent test message.
can you check your email ?
-
Do you like Weather? Then check out WxChat.com
If you want what the crazy Philippians got, then you need to do what the crazy Philippians did!
-
Do you like Weather? Then check out WxChat.com
If you want what the crazy Philippians got, then you need to do what the crazy Philippians did!
-
FK'n_dog
-
ok will test it and let you know
Do you like Weather? Then check out WxChat.com
If you want what the crazy Philippians got, then you need to do what the crazy Philippians did!
-
it still only sends message.. it has to be in this code
Code:
mail($to,$subject,$message,"From: Weather 4 PowerPoint Contact Page\nReply-To: $email\n");
?>
Do you like Weather? Then check out WxChat.com
If you want what the crazy Philippians got, then you need to do what the crazy Philippians did!
-
FK'n_dog
try this for form.php -
PHP Code:
<?php
$fullname=$_POST['fullname'];
$email=$_POST['email'];
$message=$_POST['message'];
$date = date("m/d/Y H:i:s");
$to="support@weather4powerpoint.com";
if ($REMOTE_ADDR == "") $ip = "no ip";
else $ip = getHostByAddr($REMOTE_ADDR);
mail($to,"Contact Form from Wx4PPT",
"A visitor has left the following information\n
Name : $fullname
Email : $email\n
The visitor commented:
------------------------------
$message
Logged Info :
------------------------------
Using: $HTTP_USER_AGENT
Hostname: $ip
IP address: $REMOTE_ADDR
Date/Time: $date");
?>
-
Ok I got it to work! Now I am working on adding a carriage return so that the output doens't look bad.
Here is the code I figured that $msg is $message in PHP5
Code:
<?php
$message =$_POST['fullname'];
$message .=$_POST['email'];
$message .=$_POST['message'];
$to="support@weather4powerpoint.com";
$subject="Contact Form from Wx4PPT";
mail($to,$subject,$message,"From: Weather 4 PowerPoint Contact Page\nReply-To: $email\n");
?>
This is the output that I get
fullname
emailmessage
I want
fullname
email
message
Do you like Weather? Then check out WxChat.com
If you want what the crazy Philippians got, then you need to do what the crazy Philippians did!
-
OK will do.. thanks
Originally Posted by a_modified_dog
try this for form.php -
PHP Code:
<?php
$fullname=$_POST['fullname'];
$email=$_POST['email'];
$message=$_POST['message'];
$date = date("m/d/Y H:i:s");
$to="support@weather4powerpoint.com";
if ($REMOTE_ADDR == "") $ip = "no ip";
else $ip = getHostByAddr($REMOTE_ADDR);
mail($to,"Contact Form from Wx4PPT",
"A visitor has left the following information\n
Name : $fullname
Email : $email\n
The visitor commented:
------------------------------
$message
Logged Info :
------------------------------
Using: $HTTP_USER_AGENT
Hostname: $ip
IP address: $REMOTE_ADDR
Date/Time: $date");
?>
Do you like Weather? Then check out WxChat.com
If you want what the crazy Philippians got, then you need to do what the crazy Philippians did!
-
ok here is the output
Code:
A visitor has left the following information
Name :
aaron
Email : test@xxxx.com
The visitor commented:
------------------------------
test message
Logged Info :
------------------------------
Using:
Hostname: no ip
IP address:
Date/Time: 08/19/2006 16:41:45
VERY NICE! one last thing.. what do I add in the code to make is show a from address instead of Nobody [nobody@server1.wxalliance.com]
Thank you SO MUCH!
Do you like Weather? Then check out WxChat.com
If you want what the crazy Philippians got, then you need to do what the crazy Philippians did!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|