Hi i am at a bit of a misunderstanding with this issue.
I use this code to pass the variables from page to page with hidden feilds and the print command to show the post details but is coming up like this on the pages it post's to;
Code:
{print \'$_POST(sname)\';}
and the code
PHP Code:
<? session_start(); ?>
<?php include('header.php'); ?>
<?php if(@$_GET[sign]) { ?>
<p class="header">Memberships</p>
<p>If you served with New Zealand Armed Services (Army, Navy, Airforce) in;</p>
<p>Malaya, Malaysia, Borneo, Singapore, Brunei, Thailand - within these country's Land borders, territorial waters or air space and/or Served with any other Commonwealth Country's Armed Services in the above areas you may apply to join the Association.</p>
<p>
<form action="qualify.php?page=1" method="post">
<table border="0" cellpadding="0" cellspacing="0" width="107%">
<tr>
<td align="left" bgcolor="#cccccc">Name</td>
<td align="left" bgcolor="#cccccc"><input type="text" style="width:260px" name="name" tab-index="1"><span class="alert">*</span></td>
</tr>
<tr>
<td align="left">Email</td>
<td align="left"><input type="text" style="width:260px" name="email" tab-index="2"><span class="alert">*</span></td>
</tr>
<tr>
<td align="left" bgcolor="#cccccc">Desired Username</td>
<td align="left" bgcolor="#cccccc"><input type="text" style="width:260px" name="username" tab-index="3"><span class="alert">*</span></td>
</tr>
<tr>
<td align="left">Password</td>
<td align="left"><input type="text" style="width:260px" name="password" tab-index="4"><span class="alert">*</span></td>
</tr>
<input type="hidden" name="perms" value="3">
<tr>
<td align="left" bgcolor="#cccccc">Phone</td>
<td align="left" bgcolor="#cccccc"><input type="text" style="width:260px" name="phone1" tab-index="5"><span class="alert">*</span></td>
</tr>
<tr>
<td align="left">Phone (2)</td>
<td align="left"><input type="text" style="width:260px" name="phone2" tab-index="6"></td>
</tr>
<tr>
<td align="left" bgcolor="#cccccc">Address</td>
<td align="left" bgcolor="#cccccc"><textarea rows="3" style="width:260px" name="address" tab-index="7"></textarea><span class="alert">*</span></td>
</tr>
<tr>
<td align="left">City</td>
<td align="left"><input type="text" style="width:260px" name="city" tab-index="8"><span class="alert">*</span></td>
</tr>
<tr>
<td align="left" bgcolor="#cccccc">Country</td>
<td align="left" bgcolor="#cccccc"><select name="country" />
<option value="Asia">Asia</option>
<option value="Australia">Australia</option>
<option value="Austria">Austria</option>
<option value="Belgium">Belgium</option>
<option value="Brazil">Brazil</option>
<option value="Borneo">Borneo</option>
<option value="Canada">Canada</option>
<option value="China">China</option>
<option value="Denmark">Denmark</option>
<option value="Europe">Europe</option>
<option value="Finland">Finland</option>
<option value="France">France</option>
<option value="Germany">Germany</option>
<option value="Hong Kong">Hong Kong</option>
<option value="India">India</option>
<option value="Ireland">Ireland</option>
<option value="Italy">Italy</option>
<option value="Japan">Japan</option>
<option value="Korea">Korea</option>
<option value="Latin America">Latin America</option>
<option value="Malaysia">Malaysia</option>
<option value="Mexico">Mexico</option>
<option value="Netherlands">Netherlands</option>
<option value="New Zealand" selected>New Zealand</option>
<option value="Norway">Norway</option>
<option value="Singapore">Singapore</option>
<option value="South Africa">South Africa</option>
<option value="Spain">Spain</option>
<option value="Sweden">Sweden</option>
<option value="Switzerland">Switzerland</option>
<option value="Taiwan">Taiwan</option>
<option value="UK">UK</option>
<option value="USA">United States</option>
<option value="Other">Other</option>
</select><span class="alert">*</span></td>
</tr>
<tr>
<td align="left">Served</td>
<td align="left"><input type="text" style="width:260px" name="served" tab-index="9"></td>
</tr>
<tr>
<td align="left" bgcolor="#cccccc">Unit</td>
<td align="left" bgcolor="#cccccc"><input type="text" style="width:260px" name="unit" tab-index="10"></td>
</tr>
<tr>
<td align="left">Service Number</td>
<td align="left"><input type="text" style="width:260px" name="snumber" tab-index="11"></td>
</tr>
<tr>
<td colspan="2" align="center">
<p>Add a few commments about yourself, but please remember what you enter in here will be visable to every member when logged in.</p>
<p>
<textarea rows="8" style="width:260px" name="comments" tab-index="1"></textarea><br />
</p>
</td>
</tr>
<tr>
<td align="left" bgcolor="#cccccc"></td>
<td align="left" bgcolor="#cccccc"><input type="submit" style="width:260px" value="Continue"></td>
</tr>
</table>
</form>
<?php }elseif(@$_GET["page"]) { ?>
<form action="qualify.php?activation=1" method="post">
<?php
$putinguestbook="INSERT INTO users(name, email, username, password,perms, phone1, phone2, address, city, country, served, unit, snumber, comments)
VALUES('$name','$email','$username','$password','$perms','$phone1','$phone2','$address','$city','$country','$served','$unit','$snumber','$comments')";
mysql_query($putinguestbook);
print '<pre>';
print_r($_POST);
print '</pre>';
print 'Your Information has been entered into our Database.';
?>
<input type="hidden" value="{print '$_POST(name)';}" name="sname">
<input type="hidden" value="{print '$_POST(email)';}" name="semail">
<input type="hidden" value="{print '$_POST(password)';}" name="spass">
<input type="hidden" value="{print '$_POST(username)';}" name="suser">
<input type="submit" value="Continue">
</form>
<?php }elseif(@$_GET["activation"]) { ?>
<p class="header">Completed!</p>
<form action="qualify.php?complete=1" method="post">
<p>
Click Continue to receive an email to your selected address with your account settings.
Name: - <?php print($_POST['sname']); ?> <br>
Email: - <?php print($_POST['semail']); ?> <br>
Username: - <?php print($_POST['suser']); ?> <br>
Password: - <?php print($_POST['spass']); ?> <br>
<i>Use your username and password to log in to this site to veiw or add news and links, and for more features like searching other members and getting the contact details of an old friend or service man.</i>
</p>
<p>
<input type="hidden" value="{print '$_POST(sname)';}" name="jname">
<input type="hidden" value="{print '$_POST(semail)';}" name="jemail">
<input type="hidden" value="{print '$_POST(spass)';}" name="jpass">
<input type="hidden" value="{print '$_POST(suser)';}" name="juser">
<input type="submit" value="Continue">
</p>
</form>
<?php }elseif(@$_GET["complete"]) {
$recipient = "{$_POST['jemail']}";
$subject = "Registration Complete- MVA Inc";
$sidrecipient = $global_email;
$sender = "Malayan Veterans Association Inc";
$headers = "From: $sender\r\nReply-to: $sender";
$email = $_POST['jemail'];
$name = $_POST['jname'];
$user = $_POST['juser'];
$pass = $_POST['jpass'];
$input = "Thank you for Joining the Malayan Veterans Association Inc\n
your Registration Details are\n\n
Username: $user\n
Password: $pass\n\n\n\n
If you forget your username or password you can retreive them from the website or this link\nhttp://www.malaysianveterens.co.nz/forgotpassword.php\n and enter in your email address: $email\n\n\n\nThank you,\n\n
Malayan Veterans Association Inc 2005.\n";
$sidinput = "$jname has joined the Malayan Veterans Association Inc\n
Their Registration Details are\n\n
Name: $name\n
Email: $email\n\n\n\nThank you,\n\n
Malayan Veterans Association Inc 2005.\n";
mail($recipient, $subject, $input, $headers);
mail($sidrecipient, $subject, $sidinput, $headers);
?>
Thanks you have just been registered.<br />
<a href="index.php">Continue to Login</a /><br />
<?php } ?>
<?php include('footer.php'); ?>
and this is the response email that i receive.
Code:
{print \'$_POST(sname)\';} has joined the Malayan Veterans Association Inc
Their Registration Details are
Name: {print \'$_POST(sname)\';}
Email: {print \'$_POST(semail)\';}
Thank you,
Malayan Veterans Association Inc 2005.
Thanks Sheldon.