I have been asking in loads of forums how to send an e-mail directly to me using a submit form, however it appears that there is no way with msn....so I am asking now if anybody know how to set up a page that stores all the data that people input.
Printable View
I have been asking in loads of forums how to send an e-mail directly to me using a submit form, however it appears that there is no way with msn....so I am asking now if anybody know how to set up a page that stores all the data that people input.
Just use the email() function. I have MSN and it works fine. Are you doing this locally or on a remote server?
I have no clue...
but what is the email() function?
it is how PHP can send an email.
I suggest you look at PHP.net, before you post anything else, since you seem to have a very small grasp, of what PHP is.
oops, sorry.Quote:
Originally posted by Little Ant
I have no clue...
but what is the email() function?
it's mail() not email()
you can find the paramaters and such in the manual
this is the script that I have, and it will do everything except send the actual e-mail. if you can notice any errors, and tell me why it won't send i would be greatful.
<?php
$comment = stripslashes($comment);
$YourEmail = "[email protected]";
if (!$name) {echo "You must enter your name,<BR>Please go back and make corrections.<BR> Thank you"; } else {
if(!$email == "" && (!strstr($email,"@") || !strstr($email,"."))) {echo "You must enter a VALID Email Address,<BR> Hit the back button and enter your email address."; } else {
if (!$email) {echo "Email Field was empty, please enter your email."; } else {
if (!$comment) {echo "You must leave a comment.<BR>Go back and enter your comment"; } else {
if (!$fav_script) {echo "Choose your Favorite Script"; } else {
PRINT "<FONT SIZE=-1 face=verdana>";
PRINT "$name, Thank-you very much!!";
PRINT "<HR>";
PRINT "<B>Information Sent Via Email:</b>";
PRINT "<br><BR>";
PRINT "Name: $name";
PRINT "<BR>";
PRINT "Email: $email";
PRINT "<BR>";
PRINT "Favorite Scripting Technology: $fav_script";
PRINT "<BR>";
PRINT "Comments:$comment";
PRINT "<HR>";
PRINT "<B><a href=http://www.php50.com/circusmijit13>PLEASE CLICK HERE, To get back on our Site</a>";
PRINT "<hr>";
PRINT "</b></body>";
PRINT "</html>";
mail("$email", "Thanks For Your Email", "
Thank-you $name,
\nYou filled out our E-mail Form.\nThe Information that was submitted was:
\nName:$name\nEmail:$email\nFavorite Scripting Technology: $fav_script
Comment: $comment\n\nRegards,\nNick\nwww.realgoodhosting.com");
mail("$YourEmail", "Email Form Result", "
From: $name,
\n$name filled out our E-mail Form.\nThe Information that was submitted was:
\nName:$name\nEmail:$email\nFavorite Scripting Technology: $fav_script
Comment: $comment\n\nRegards,\nWebMaster\nwww.realgoodhosting.com");
}
}
}
}
}
?>