I am new to PHP and need some help with an form mail problem. I have a user registration form with 8 fields. When users register I submit the reults to a database. I also want to be able to send a confirmation email to the user and an administrator.
Basically i know how to get a form to submit data to MySQL and I know how email the contents of a form seperately . But how do i get a form to do both?
Hi, Once you have added the data to your database call the Mail() function.
something like this:
$result = mysql_query($sql_insert, $connection); if($result){ mail("$to","$subject","$emailText","From: $email"); }
HTH
Thanks for your help thus far,
I take it i would need to annotate this part of the code but I'm still noy sure how?
mysql_select_db($database_casu, $casu); $Result1 = mysql_query($updateSQL, $casu) or die(mysql_error());
Originally posted by philiporourke Thanks for your help thus far, I take it i would need to annotate this part of the code but I'm still noy sure how? mysql_select_db($database_casu, $casu); $Result1 = mysql_query($updateSQL, $casu) or die(mysql_error());
Try it without the die command.
Because without it, $Result1 will become true or false based on if it was able to run the query successfully.
If there is something wrong with the query right now, it'll just input true for the die function if it was able to execute properly
Has any one delt with the problem of mailing this way and having it not make it to the recepient because their spam filter is set too high and will not allow the from tag because it is masqurading the actual sending address.