I have a form which sends it's output to a page.The user agrees with what has been sent, and the data is sent to a third page to add a new line to MySQL.
The first and second pages work, but the new line is empty.
$db_name="tht"; // Database name
$tbl_name="users"; // Table name
// username and password sent from form
$fname=$_POST['fname'];
$sname=$_POST['sname'];
$email=$_POST['email'];
$mobile=$_POST['mobile'];
$gender=$_POST['gender'];
$pcode=$_POST['pcode'];
$user_level=$_POST['usr_level'];
// username and password sent from form
$fname=$_POST['fname'];
$sname=$_POST['sname'];
$email=$_POST['email'];
$mobile=$_POST['mobile'];
$gender=$_POST['gender'];
$pcode=$_POST['pcode'];
$user_level=$_POST['usr_level'];
$body = "Hi there.<br>Someone entered this address to register at THT's site. If it wasn't you, please accept our apologies. Your data will be removed within seven days. <br>Otherwise, please follow the link below. <hr> For more info on the trust, please visit http://www.tht.org ";
echo 'Thank-you'.$fname.'. Your message has been sent to '.$email;
mail($to, $subject, $body, $header);
?>
<br />
An email has been sent to the address you entered. <br />
This contains a link, and when you click this the registration is complete.
<p>
You should follow this link within <strong>seven days</strong>, or <a href="#">request</a> a new email.
$body = "Hi there.<br>Someone entered this address to register at THT's site. If it wasn't you, please accept our apologies. Your dat will be removed within seven days. <br>Otherwise, please follow the link below. <hr> For more info on THT, please visit http://www.tht.org ";
echo 'Thank-you'.$fname.'. Your message has been sent to '.$email;
mail($to, $subject, $body, $header);
?>
<br />
This message contains a link, and when you click this the registration is complete.
<p>
You should follow this link within <strong>seven days</strong>, or <a href="#">request</a> a new email.
</div>
...
</div>
</body>
</html>
...but actually, couldn't I just do it one page? I'd just need the SQL to fire when the "register me" button is pressed ... something like
Bookmarks