View Full Version : Form Help

02-17-2006, 06:01 PM
Sorry All i know its been posted alot, But I have created an html form. Now i click the red box around the text fields and am confused on the Action Property. In my server files I have Folders: Site + _private(formmail.htm, php.dat, sendresults.php), cgi-bin(some extra Pics, and pages are), connections(empty), htdocs(which is where all my pages and content are), and redirect_bin(where my thank for form submission is at)

I created the folders _private, redirect_bin. (trying to get the form to work)

I can get into my server and set up (threw the host company) CGI, FTP, Web design, email center, domain tools, Database Manager, and many other things.

Here is what i would like to happen:
1: fill form out and send to my email
2: Tell person filling out form "thank you form submitted.
3: redirect them to the home page

I have used swishmax for the last 4 yrs, and am moving up to DW. I know its probably simple stuff but i feel like I stepped back to knowing nothing. I will attach the code for the form

oh and lastly how do you make the form text field require an entry
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Boat &amp; Yacht Hauling Quotes</title>

<body bgcolor="#FFFF99">
<form action="sendresults.php" method="post" name="Quoteform" id="Quoteform">
<p align="center"><font color="#0000CC" size="6">Quote Form </font></p>

<font color="#0000CC">Name:</font>
<input name="Name" type="text" id="Name" size="54">

<font color="#0000CC">Address:</font>

<input name="Address" id="Address" size="51">

<font color="#0000CC">City:
<input name="City" type="text" id="City" size="35">
<input name="State" type="text" id="State" size="5" maxlength="2">
<input name="Zip" type="text" id="Zip" size="10" maxlength="5">

<font color="#0000CC">Phone #'s: H.
<input name="Home" type="text" id="Home" size="13" maxlength="9">
<input name="Work" type="text" id="Work" size="13" maxlength="9">
<input name="Cell" type="text" id="Cell" size="13" maxlength="9">
<input name="Fax" type="text" id="Fax" size="13" maxlength="9">

<font color="#0000CC">Email:
<input name="Email" type="text" id="Email" size="54">
<p align="center"><font color="#009900" size="4"><font color="#990000">Load Description</font></font></p>
<p align="left"><font color="#990000">Make:
<input name="Make" type="text" id="Make" size="30">
<input name="Model" type="text" id="Model">
<input name="Year" type="text" id="Year" size="10" maxlength="4">
<p align="left"><font color="#990000">Weight:
<input name="Weight" type="text" id="Weight" size="10">
<input name="Length" type="text" id="Length" size="5">
<input name="Width" type="text" id="Width" size="10">
<input name="Height" type="text" id="Height" size="10">
<input name="textfield" type="text" size="5">
<p align="left"><font color="#990000">Mast:

<input type="radio" name="MastY/N" value="Yes">
<input name="RadioGroup1" type="radio" value="No" checked>
No Length:
<input name="Mast Length" type="text" id="Mast Length" size="5">
<p align="left"><font color="#990000">Trailer:
<input type="radio" name="TrailerY/N" value="Yes">
<input name="RadioGroup1" type="radio" value="No" checked>
No Cradle:
<input type="radio" name="CradleY/N" value="Yes">
<input name="RadioGroup1" type="radio" value="No" checked>
<p align="left"><font color="#990000">Bridge or Arch need to be removed:
<select name="Bridge/Arch" id="Bridge/Arch">
<option value="Yes">Yes</option>
<option value="No">No</option>
<option value="N/A" selected>N/A</option>
<p align="left"><font color="#009933"><font color="#009900" size="4"> Loading Location <font color="#FF0000">Delivery Location </font></font></font></p>
<p align="left"><font color="#009900">Marina:</font>
<input name="LoadingMarina" type="text" id="LoadingMarina" size="30">

<font color="#FF0000">Marina:</font>
<input name="Delivery Marina" type="text" id="Delivery Marina" size="30">
<p align="left"><font color="#009900">Address:</font>
<input name="LMAddress" type="text" id="LMAddress" size="30">
<font color="#FF0000"> Address:</font>
<input name="DMAddress" type="text" id="DMAddress" size="30">
<p align="left"><font color="#009900">City, St., Zip:</font>
<input name="LMCitySTzip" type="text" id="LMCitySTzip" size="30">
<font color="#FF0000">City, St.,Zip</font><font color="#FF0000">:</font>
<input name="DMCityStZip" type="text" id="DMCityStZip" size="30">
<p align="left"><font color="#009900">Contact &amp; Ph#:
<input name="LMPH#" type="text" id="LMPH#">
<font color="#FF0000">Contact &amp; Ph#:</font>
<input name="DLPH#" type="text" id="DLPH#">
<p align="left"><font color="#0000FF">Date you would like to move Load?
<input name="Move Date" type="text" id="Move Date">
Any other Prices Quoted?
<input name="OtherQuotes" type="text" id="OtherQuotes" value="">
<p align="left"><font color="#990066">Any other information you would like to provide us.</font></p>
<p align="left"><font color="#990066">
<textarea name="other info" cols="75" id="other info"></textarea>
<p align="center">
<font color="#009900">
<input type="submit" name="Submit" value="Submit">
<input type="reset" name="Reset" value="Reset">
<p align="center"> </p>

02-17-2006, 06:10 PM
Put your formmail.htm, sendresults.php and your thank you page in the HTDOCS directory.

Also whatever you do ,keep your files in HTDOCS and no where else.

02-17-2006, 06:22 PM
Now what about pointing the form to either a file on the server or getting it to email to me. I created an email on the server (quoteform@yachthauling.com) but want it to end up at yachthauling@msn.com

02-17-2006, 06:33 PM
Have you edited the parameters in sendresults.php file.

I hope you have read the tutorial, and know which parameters to edit


in your sendresults.php ,edit the following

# $subject (Subject of email sent to you)
# $emailadd (Your email address. This is where the form information will be sent)
# $url (Where to redirect after form is processed. )
# $req (Makes all fields required. If set to '1' no field can not be empty. If set to '0' any or all fields can be empty.)

02-17-2006, 06:35 PM
$subject = 'Yacht Hauling Quote';
$emailadd = 'yachthauling@msn.com';
$url = 'http://www.yachthauling.com/redirect%20page.htm';
$req = '0';
$text = "Results from form:\n\n";
$space = ' ';
$line = '
foreach ($_POST as $key => $value)
if ($req == '1')
if ($value == '')
{echo "$key is empty";die;}
$j = strlen($key);
if ($j >= 20)
{echo "Name of form element $key cannot be longer than 20 characters";die;}
$j = 20 - $j;
for ($i = 1; $i <= $j; $i++)
{$space .= ' ';}
$value = str_replace('\n', "$line", $value);
$conc = "{$key}:$space{$value}$line";
$text .= $conc;
$space = ' ';
mail($emailadd, $subject, $text, 'From: '.$emailadd.'');
echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';

02-17-2006, 06:38 PM
post the link please

02-17-2006, 06:41 PM
my website?? www.yachthauling.com I have not uploaded any changes yet. i have it forwarding to an old site formthat works.

02-17-2006, 06:43 PM
wee need to see the page to guess out the problem.

What problem are you facing at the moment.

02-17-2006, 06:55 PM
okay uploaded everything


02-17-2006, 08:50 PM
Anyone got any ideas on whats wrong with this???

02-17-2006, 09:06 PM
Mate, please prvode link to your form page.

02-17-2006, 09:14 PM


02-17-2006, 09:22 PM
I think your host does not support PHP.

Upload the attached file (checkphp.php) in your HTDOCS directory and then open that page, this will tell ya it support PHP or not.

02-17-2006, 10:19 PM

02-18-2006, 03:43 AM
On your site the form action is:
<form action="/sendresults.php" method="post" name="Quoteform" id="Quoteform">

Problem is /sendresults.php
remove the /


02-18-2006, 06:35 PM
Changed it but still nothing