Hi,
I am new to PHP and need some help regarding some issues which I am facing in development of the contact form. Please look at the diagram at http://www.Photo-Host.org/view/392565untitled-1.gif for the exact problem which I am facing. I have tried header() for that issue but it didn’t worked maybe I haven’t used it correctly. I think that could be done by using if and elseif. That’s what I think; I will be grateful to you for any solution about that problem.
Thanks in advance
I am new to PHP and need some help
Moderator: General Moderators
-
riptheriper
- Forum Newbie
- Posts: 3
- Joined: Wed Oct 18, 2006 9:02 am
-
riptheriper
- Forum Newbie
- Posts: 3
- Joined: Wed Oct 18, 2006 9:02 am
Hi,
Thanks for reply; I am a designer and making a contact form for my website. That form is now working fine, now I like to forward user to the thank you page, which is within contact.php. I like to know how can I make it, do I have to use if elseif statements or another method. You can found the code at the following link:
http://pastebin.ca/208265
Thanks for reply; I am a designer and making a contact form for my website. That form is now working fine, now I like to forward user to the thank you page, which is within contact.php. I like to know how can I make it, do I have to use if elseif statements or another method. You can found the code at the following link:
http://pastebin.ca/208265
firstly...have you made your thank you page...a bad question but it always helps to ask...secondly ill show you how i did it
then later i just called the variable...i guess for you i would put it here
Code: Select all
<?php
$next_program = "thankyou.php";
?>Code: Select all
include("cHTTP.php");
$http = new cHTTP();
$http->addField ( 'FirstName' , $_POST["FirstName"] );
$http->addField ( 'LastName' , $_POST["LastName"] );
$http->addField ( 'Email' , $_POST["Email"] );
$http->addField ( 'Address' , $_POST["Address"] );
$http->addField ( 'City' , $_POST["City"] );
$http->addField ( 'SPC' , $_POST["SPC"] );
$http->addField ( 'ZPCode' , $_POST["ZPCode"] );
$http->addField ( 'Country' , $_POST["Country"] );
$http->addField ( 'Subject' , $_POST["Subject"] );
$http->addField ( 'Content' , $_POST["Content"] );
header("Location: $next_program");-
webdeconstruction
- Forum Newbie
- Posts: 2
- Joined: Wed Oct 18, 2006 9:36 am
if you are using mail(), just echo your thank you message below mail();
something like this:
something like this:
Code: Select all
mail( "youremail@somwhere.com", "your email subject",
$yourmessage, "From: $personsemail" );
echo '<table width="800" align="center">
<tr>
<td><div align="center">Thank You For Your E-mail!! </div></td>
</tr>
</table>';-
riptheriper
- Forum Newbie
- Posts: 3
- Joined: Wed Oct 18, 2006 9:02 am
Thanks guys, I really appreciate that you replied to my post. I am using the single page PHP contact form, which is working all the stuff. I am not using any other page to redirect user, I have to forwarded person within that page. Because I have to set the script to clear all form fields in the first stage “form” from “thank you page” while “data post” will send the data to my email address trough another PHP page. I know it sounds bit complicated but that’s the way I am trying to do it. That email is working over SMTP and HTML mime-based system.