Hi all,
I am having a problem with a php script where a contact us page collects visitor info, and they click send, and that takes them to a confirm page and they click send again it will not hold the variables.
at the moment I only have it to show the message but will not hold the message variable.
Here is my code:
This is the confirmation page:
[code=php]
<html>
<head>
<title>
Please confirm the information is correct
</title>
</head>
<body>
<h1>Please confirm this message</h1>
<p><?php
echo “<b>First Name:</b> $fname <br />”;
echo “<b>Surname:</b> $surname<br />”;
echo “<b>Phone:</b> $phone<br />”;
echo “<b>Fax:</b> $fax<br />”;
echo “<b>Email:</b> $email<br />”;
echo “<b>Company Name:</b> $busname<br />”;
echo “<b>Subject:</b> $subject<br />”;
echo “<b>Attention:</b> $attention<br />”;
echo “<b>Message:</b> $message<br />”;
?>
</p>
<form method=”post” action=”correspondence_submited.php”>
<input type=”button” value=”Edit” onclick=”_back”>
<input type=”submit” value=”Send”>
</form>
</body>
</html>
and here is the Sending page:
[code=php]<?php
if ($attention==’Manager’) {
//$toaddress = ‘Email address removed’;
$toaddress = ‘Email address removed’;
}
//echo “<b>Attention:</b> <br />”;
/*’Client Name: ‘$fname’ ‘$surname “N”
‘Phone: ‘$phone “N”
‘Fax: ‘$fax “N”
‘Email: ‘$email “N”
‘Company Name: ‘ $busname “N” */
$mailcontent = ‘Clients message: $message’;
mail($toaddress, $subject, $mailcontent);
?>
<html>
<head>
<title>
Message has been sent.
</title>
</head>
<body>
<h1>This message has been sent.</h1>
<?php
echo ‘<b>Attention:</b> ‘.$attention.'<br />’;
echo ‘<b>to address:</b> ‘.$toaddress.'<br />’;
?>
</body>
</html>
My website is [url]www.macleaybec.com.au
The other fields have I not added code for them yet.
If you say it is not well designed, that is because I have not finished it yet.