![]() |
|
||||||||||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|||||
|
|
#1 |
|
WLC Lover
Join Date: Oct 2010
Posts: 94
|
Hi,
I want to design my Thank You Page, Unfortunately, i dont know how. Please Help. Code:
<?php
$subject = "Request Availablity Email";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "Return-Path: sample@sample.com \r\n";
$headers .= "From: do-not-reply@sample.com \r\n";
$headers .= "X-Priority: 1\r\n";
$headers .= "X-MSMail-Priority: High\r\n";
$fname = $_POST['f_name'];
$lname = $_POST['l_name'];
$message = $_POST['emessage'];
$uemail = $_POST['email'];
$phone = $_POST['telephone'];
$floor = $_POST['floor'];
$movein = $_POST['movein'];
$radio = $_POST['radio1'];
$whole = "From: $uemail <br /> Fullname: $fname-$lname <br /> Phone:$phone <br /> FloorPlan: $floor <br /> Move-in Date: $movein <br /> Visited the CasaVerde Location: $radio1 <br />$message";
if(mail("sample@sample.com", $subject, $whole, $headers)){
echo "Thanks! We will get back to you as soon as possible!<br /><br />";
echo $fname."<br />";
echo $lname."<br />";
echo $uemail."<br />";
echo $phone."<br />";
echo $message."<br />";
// if only i can design something here (like html or somethin, but if i change the code, the email will work but i'll get a 500 page )
}else{
echo mysql_error();
}
?>
Code:
<form action="send.php" method="post" name="contactForm" id="contactForm">
<table width="200" style="border:0px;">
<tr>
<td>*FirstName:</td>
<td><input type="text" name="f_name" /></td>
</tr>
<tr>
<td>*LastName:</td>
<td><input type="text" name="l_name" /></td>
</tr>
<tr>
<td>*Email Address:</td>
<td><input type="text" name="email" /></td>
</tr>
<tr>
<td>Phone Number:</td>
<td><input type="text" name="telephone" /></td>
</tr>
<tr>
<td>Floorplan</td>
<td>
<select name="floor">
<option value="Any">Any</option>
<option value="1 Bedroom">1 Bedroom</option>
<option value="2 Bedroom">2 Bedroom</option>
</select>
</td>
</tr>
<tr>
<td>*Move-in</td>
<td><input type="text" name="movein" /></td>
</tr>
<tr>
<td>*Have you visited this community:</td>
<td>
Yes:<input type="radio" name="radio1" value="Yes" checked />
No:<input type="radio" name="radio1" value="No" />
</td>
</tr>
<tr>
<td colspan="2">Message:<br /><textarea cols="30" rows="3" name="emessage" ></textarea> </td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="Submit" /></td>
</tr>
</table>
</form>
</form>
Also, the Floorplan Dropdown and Radio Buttons (yes, no) doesnt get included in the email. Do i have to use arrays for the dropdown? Thanks a lot! Last edited by vinex08; 24th March 12 at 03:22 AM. |
|
|
|
|
|
#2 |
|
WLC Lover
Join Date: Oct 2010
Posts: 94
|
Or if the email was successful, it will just redirect to the Thankyou Page, Saying, "Thanks blah blah blah and it will output the Information inputted.
I tried changing the echo "Thanks! We will get back to you as soon as possible!<br /><br />"; to redirect('thanks.php'); but i get an page error(500) |
|
|
|
|
|
#3 |
|
Banned
Join Date: Jun 2006
Location: Blackp ool U.K.
Posts: 3,197
|
You cannot send headers (which a redirect is) to a user agent once text output has been sent.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
Linear Mode |
|
|