ok..ill try to explain the whole senario...
this is what im tryingto accomplish...the user enters his name,email address and a reference #. after he submits this info, a serial number is automatically emailed to them.
I have the database all set and I also have the php page set up. I will include this php page below.
my problem is getting the info from the user to this php page.
<?php
// Check if we have all the nessasary information
if(!(isset($GET[name]) && isset($GET
$link = mysql_connect("db.xxxx.com", "xxxx" ,"xxxx");
mysql_select_db("database");
$query = "SELECT * FROM email_serials WHERE refno='$_GET[refno]'";
$result = mysql_query($query);
if(mysql_num_rows($result))
$row = mysql_fetch_array($result);
else {
$query = "UPDATE email_serials SET refno='$GET[refno]', name='$GET[name]', email='$_GET[email]' WHERE ISNULL(refno) LIMIT 1";
mysql_query($query);
$result = mysql_query("SELECT * FROM email_serials WHERE refno='$_GET[refno]'");
$row = mysql_fetch_array($result);
}
$subject = "Your serial";
$message = "Dear $row[name],
Your serial is: $row[serial]
Your registration code is: $_GET[refno]
Please keep this information for future reference.
";
mail("$row[name] <$row[email]>", $subject, $message, "From: [email]webmaster@xxxx.com"> ) && isset($_GET[refno])))
exit;
$row = "";
$link = mysql_connect("db.xxxx.com", "xxxx" ,"xxxx");
mysql_select_db("database");
$query = "SELECT * FROM email_serials WHERE refno='$_GET[refno]'";
$result = mysql_query($query);
if(mysql_num_rows($result))
$row = mysql_fetch_array($result);
else {
$query = "UPDATE email_serials SET refno='$GET[refno]', name='$GET[name]', email='$_GET[email]' WHERE ISNULL(refno) LIMIT 1";
mysql_query($query);
$result = mysql_query("SELECT * FROM email_serials WHERE refno='$_GET[refno]'");
$row = mysql_fetch_array($result);
}
$subject = "Your serial";
$message = "Dear $row[name],
Your serial is: $row[serial]
Your registration code is: $_GET[refno]
Please keep this information for future reference.
";
mail("$row[name] <$row[email]>", $subject, $message, "From: [email]webmaster@xxxx.com");
?>
<HTML>
<BODY>
Serial have been submitted to <?php echo $row[name] ?> at <?php echo $row[email] ?>.
</BODY>
</HTML>