gesf
New member
Use $_POST["Occupation"] instead of $_POST[Occupation].
You need to print/echo what will be in the client side, e.g: html.
Try this next code. page2.php:
page3.php:
You need to print/echo what will be in the client side, e.g: html.
Try this next code. page2.php:
Code:
<form method="post" action="page3.php">
<?php
print '<input type="hidden" name="Occupation" value="' . $_POST['Occupation'] . '">';
print '<input type="hidden" name="Organization" value="' . $_POST['Organization'] . '">';
?>
Email<input type="text" name="Email" size="50">
<p>Street address<input type="text" name="Street_Add" size="50">
<input type="submit" value="Submit">
</form>
Code:
<?
$msg = "Here are the information";
$msg .= "\nOccupation: " . $_POST['Occupation'];
$msg .= "\nOrganization: " . $_POST['Organization'];
$msg .= "\nEmail: " . $_POST['Email'];
$msg .= "\nStreet Address: " . $_POST['Street_Add'];
$to = "receiver_mail@test.com";
$subject = "Registration";
$mailheaders = "Reply-To: " . $_POST['Email'];
mail($to, $subject, $msg, $mailheaders);
?>