jwk811 Posted September 29, 2006 Share Posted September 29, 2006 Was trying to send a simple test email to my self.. I used this script...[code]<?php$to = "(myemail)";$subject = "My subject";$txt = "Hello world!";$headers = "From: webmaster@example.com" . "\r\n" ."CC: (myemail)";mail($to,$subject,$txt,$headers);?>[/code]And I uploaded it to the server and went to that page.. this was all that was displayed..[quote]Parse error: parse error, unexpected T_VARIABLE in /home/content/j/w/k/jwk811/html/testemail.php on line 1[/quote]Does anyone know what this means or what I might of done wrong? Quote Link to comment Share on other sites More sharing options...
Demonic Posted September 29, 2006 Share Posted September 29, 2006 its all scrunched together.[code]<?php$to = "(myemail)";$subject = "My subject";$txt = "Hello world!";$headers = "From: webmaster@example.com" . "\r\n" ."CC: (myemail)";mail($to,$subject,$txt,$headers);?>[/code]try that Quote Link to comment Share on other sites More sharing options...
jwk811 Posted September 29, 2006 Author Share Posted September 29, 2006 oh lol thank you ill try that and let you know in a sec what happens Quote Link to comment Share on other sites More sharing options...
jwk811 Posted September 29, 2006 Author Share Posted September 29, 2006 YES IT WORKED!!!!!!!!! IM SO HAPPY!!!! LOL thank you very much for you help im going to get started on working on this... thought it was too easy to be true and thats just what i need! ;D :D Quote Link to comment Share on other sites More sharing options...
Demonic Posted September 29, 2006 Share Posted September 29, 2006 Yeah Man No problem You got MSN?email it to me on my spam email php4skill[at]gmail[dot]com Quote Link to comment Share on other sites More sharing options...
jwk811 Posted September 29, 2006 Author Share Posted September 29, 2006 ok thanks. and no ive got only AIM. could you tell me how and where to add a redirect or could I just make that page the redirect page instead? Quote Link to comment Share on other sites More sharing options...
jwk811 Posted September 29, 2006 Author Share Posted September 29, 2006 oh and does these email need to go through a server like the form processors do? cuz i need to know if the delays vary based on how many people try to send an email at once or whatever Quote Link to comment Share on other sites More sharing options...
Demonic Posted September 29, 2006 Share Posted September 29, 2006 oh im not sure mate. Don't have answer to tht one,but You might want to add a disclaimer saying about how you dont have any responsibility on how many users send an email. Quote Link to comment Share on other sites More sharing options...
jwk811 Posted September 29, 2006 Author Share Posted September 29, 2006 ok and what would i add to the script to redirect to another page? Quote Link to comment Share on other sites More sharing options...
jwk811 Posted September 29, 2006 Author Share Posted September 29, 2006 <?php$name = $_POST["name"];$email = $_POST["email"];$info = $_POST["info"];$to = "(myemail)";$subject = "Info";$message = "$name, $info";$headers = "From: $email" . "\r\n" .mail($to,$subject,$txt,$headers);?>does this look like its set up right because im having just little bit of trouble, if this is right it must be the form Quote Link to comment Share on other sites More sharing options...
doni49 Posted October 1, 2006 Share Posted October 1, 2006 [quote author=jwk811 link=topic=109914.msg443463#msg443463 date=1159497403]ok and what would i add to the script to redirect to another page?[/quote]I assume you're wanting to thank the user for sending the email or something like that--that's what I think you meab by 'redirect to another page'.header("Location: thankyou.html"); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.