Hi All
I'm trying to Submit a registration Form to a MySQL Database. easy so far...
problem is I want to also mail there request to me no problem to mail but to print the information the user enter to the mail function is what I'm have trouble in
Here my code
<?php
require('connection');
if ($submit) {
// process form
$sql = "INSERT INTO conti
(name,paddress,pcity,pst,pzip,lnum,aid,mid) VALUES (
'$name',
'$paddress',
'$pcity',
'$pst',
'$pzip',
'$lnum',
'$aid',
'$mid')";
$result = mysql_query($sql);
print mysql_error();
echo "<BR><BR><BR><BR><FONT SIZE=3 COLOR=\"#00FF00\" FACE=\"Arial\">Registration has been Submitted</A></FONT></A></FONT>";
$myrow = ($sql);
$id = $myrow["id"];
$lnum = $myrow["lnum"];
$name = $myrow["name"];
$paddress = $myrow["paddress"];
$pcity = $myrow["pcity"];
$pst = $myrow["pst"];
$pzip = $myrow["pzip"];
$agent = $myrow["agent"];
$aid = $myrow["aid"];
$email = $myrow["email"];
$mid = $myrow["mid"];
$sendto = "$email";
$subject = "New registration";
$message = "Registration\n\n
a New regitration has been submitted\n
$name
$paddress
$pcity
$pst
$pzip
$agent
$aid
$email
$mid
$from = "return email";
mail("$sendto","$subject","$message","from: $from");
} else {
// display form
?>
everything works but I cant print the user info Helpme
Thanks in Advance