Log in

View Full Version : Form



tbird
08-19-2005, 05:36 PM
I need to make a form that has an input box for name, when to start showing the message, when to stop showing the message, and the message [text] area, then, of course, the submit button.
I need that to post onto a different page than the one the form is located on.
This is for a band site shows feature, I designed the site but I've never before worked with forms, so I need a little help here [please!!].

simonf
08-23-2005, 02:26 PM
Hi

See the url : http://www.skileadingtours.co.za/quote.htm

which when completed (view source) uses another file email_query.php to email it.... this file contains the following text:


<?
//mail to inbox@website.com
$header = "from: inbox@website.com\r\n";
$message = "This email was generated by the Ski Leading Tours Website. The following was submitted by the user:\n
Name: $Name
Agency: $Agency
Tel: $Tel
Email: $Email
Resorts:
";
for ($i=0;$i<sizeof($HTTP_POST_VARS[Resort]);$i++) {
$message .= "\t".$HTTP_POST_VARS[Resort][$i]."\n";
}
$message .= "Accommodation: $Accommodation
From: ". date("d M Y",mktime (0,0,0,$fromDate_month,$fromDate_day,$fromDate_year)) ."
To: ". date("d M Y",mktime (0,0,0,$toDate_month,$toDate_day,$toDate_year)) ."
Adults: $Adults
Children: $Children
Accommodation: $Accommodation
Entertainment: $Entertainment
Rooms/Sleeping arrangements:
$Rooms\n
Notes:
$Notes
";
mail("inbox@website.com","Ski Leading Tours: Enquiry",$message,$header);
?>
<SCRIPT LANGUAGE="JavaScript1.1">
alert('Thank you for your enquiry. We will contact you as soon as we can.');
location.href = 'indexdata.htm';
</SCRIPT>