Two Contact Forms. Is it Possible

I’m afraid that PHP is a mystery to me, but I have a site where I want two contact forms to be available, with the subsequent “thank you” pages being different for each one.

At present they both go to the same pages.

The pages are: http://www.c5d.co.uk/addresschange.php which when complete goes to http://www.c5d.co.uk/send_contact.php

The second page is http://www.c5d.co.uk/addresschangetwo.php which also goes to http://www.c5d.co.uk/send_contact.php I’d like it to go to
http://www.c5d.co.uk/send_contacttwo.php Is this possible and if so how.

Please reply as if you were talking to a simpleton. When it comes to this you are.

This is the coding

<?php

// Contact subject
$subject =“$Contact Form”;

// Details
$message=“$detail”;

// Mail of sender
$mail_from=“$customer_mail”;

// From
$header=“from: $detail <$mail_from>”;

// Enter your email address
$to =‘antonylambert@c5d.co.uk’;

$send_contact=mail($to,$subject,$message,$header);

// Check, if message sent to your email
// display message “We’ve recived your information”
if($send_contacttwo){
echo “Thanks for sending this change of details. I shall update our records right away.”;
}
else {
echo “ERROR”;
}
?>

Thanks

Antony

Antony,
This is incredibly simple.

In each of those pages (‘addresschange.php’ and ‘addresschangetwo.php’) you will find this line of HTML


<form name="form1" method="post" action="send_contact.php"></form>

That represents the page that will accept the submitted form data. In this case, it is also the page that is displayed to the user.

Just change that “send_contact.php” value to “send_contacttwo.php” as appropriate.

Thanks for that, the form comes through now, but it is not sending details. IE, the info I type in, does not come through on the e mail. And the E Mail comes through twice.

Where have I gone wrong ?

This is the HTML/CSS I am using.

<ul class=“opendays”>
<li>
<p><strong>Change of Address</strong></p>
</li>
</ul>

<ul class=“opendays”>
<li>
<p><form name=“form1” method=“post” action=“send_contacttwo.php”></li>
<li>
<p>Please note my new details</p>
<p></p>
</li>
<li>
<p>With effect from:</p>
<p><input name=“subject” type=“text” id=“subject” size=“50”></p>
</li>
<li>
<li>
<p>Name</p>
<p><input name=“subject” type=“text” id=“subject” size=“50”></p>
</li>
<li>
<p>New Address</p>
<p><textarea name=“detail” cols=“50” rows=“4” id=“detail”></textarea></p>
<p></p>
</li>
<li>
<p>New Phone Number</p>
<p><input name=“name” type=“text” id=“name” size=“50”></p>
<p></p>
</li>
<li>
<p>New Mobile Number</p>
<p><input name=“name” type=“text” id=“name” size=“50”></p>
<p></p>
</li>
<li>
<p>New Email Address</p>
<p><input name=“customer_mail” type=“text” id=“customer_mail” size=“50”></p>
<p></p>
</li>
<li>
<p> </p>
<p> </p>
<p><input type=“submit” name=“Submit” value=“Submit”> <input type=“reset” name=“Submit2” value=“Reset”></p>
</li>
</ul>
</form>

Thanks for help

Antony