Here is the code: I am having trouble passing the email_name variable in the url to get it to register in the database insert line?
<html>
<body>
<?php
$my_email="info@*************.com";
if ($submit) {
// process form
$db = mysql_connect("***", "","**");
mysql_select_db("bpafuner_test",$db);
$sql3 = "INSERT INTO archivecondolence (id,Fullname,cond_name,cond_city,cond_email,cond_message,enter_email) VALUES ('$id', '$Fullname', '$cond_name','$cond_city','$cond_email','$cond_message','$enter_email')";
$result3 = mysql_query($sql3);
$sql = "INSERT INTO condolence (id,Fullname,cond_name,cond_city,cond_email,cond_message,enter_email) VALUES ('$id', '$Fullname', '$cond_name','$cond_city','$cond_email','$cond_message','$enter_email')";
$result = mysql_query($sql);
if ($enter_email){ $sql1 = "INSERT INTO emails (id,Fullname,cond_name,cond_city,cond_email,cond_message, enter_email) VALUES ('$id', '$Fullname', '$cond_name','$cond_city','$cond_email','$cond_message','$enter_email')";
$result1 = mysql_query($sql1);
}
echo "<center><font size=6>Thank you!</font></center>\n";
echo "<center><font size=4>Your condolence has been sent to the family!</font></center>\n";
echo "<center><font size=2><a href=six.php>Click here to go back</a></font></center>\n";
$confirm_to = "$cond_name"."<$my_email>";
$confirm_header = "From: BPA Website Condolence Service<info@bpafunerlahome.com>";
$confirm_message = "A condolence message for the family of $Fullname.\n\nFrom: $cond_name\nLocation: $cond_city\nEmail: $cond_email\nMessage: $cond_message\n";
$confirm_subject = "For the family of $Fullname";
@mail($confirm_to, $confirm_subject, $confirm_message, $confirm_header);
} else{
// display form
?>
<TABLE BORDER=0 WIDTH=600 align=center><TR><TD><FONT FACE=Garamond SIZE=3 COLOR=#000000>
<P><CENTER><FONT FACE=verdana SIZE=5><A HREF=./><IMG SRC=Graphics/quote-cond.jpg BORDER=0 WIDTH=227 HEIGHT=42></A></FONT></CENTER></P>
<P ALIGN=JUSTIFY>In this grievous time, your condolences to the family are much appreciated. To send your condolences, simply fill out the fields below. Click the <B>Submit</B> button at the bottom when you are finished. We will ensure your condolences reach the family. Thank you.</P>
<tr></TR>
<tr></TR>
<TR><TD BGCOLOR=#000000 ALIGN=CENTER><B><FONT SIZE=3 COLOR=#FFFFFF>Send your condolences to the family of <?php echo $Fullname?></FONT></B></TD></TR>
</table>
<?php
printf ("<form method=post action=eleven.php?id=%s&Fullname=%s&enter_email=%s\n>", $id, urlencode($Fullname), $enter_email); ?>
<center>Your name:<br></center>
<center><input type=Text name=cond_name size=50>
<br></center>
<center>Your city:<br></center>
<center><input type=Text name=cond_city size=50>
<br></center>
<center>Your e-mail address:<br></center>
<center><input type=Text name=cond_email size=50>
<br></center>
<center>Message:<br></center>
<center><TEXTAREA NAME=cond_message cols=50 rows=10 TYPE=TEXT ALIGN=center WRAP=virtual></textarea>
<br></center>
<center><input type="checkbox" name="enter_email" value="enroll">
Enroll in obituary updates by email.<br>
<a href=explain.html taget='_blank'>Click For An Explanation Of Obituary Updates</a><br>
<br><center><input type="Submit" name="submit" value="Send To Family"></center>
</form>
<?php
} // end if
?>
</body>
</html>