PDA

View Full Version : How do I activate my FORM in Dreamweaver


K.Simmonds
06-11-2009, 02:37 PM
I'v just created a form on one of my websites. It has a couple of dropdown boxes and text areas, and it looks fine in a browser. I've added the "submit" button ........................... NOW WHAT? I'm stuck. I've spent all afternoon, and I'm no further forward. I know that I have to direct it to a PHP or CGI, but I'm not sure what they are. HELP !!!!

Corrosive
06-11-2009, 02:39 PM
I'v just created a form on one of my websites. It has a couple of dropdown boxes and text areas, and it looks fine in a browser. I've added the "submit" button ........................... NOW WHAT? I'm stuck. I've spent all afternoon, and I'm no further forward. I know that I have to direct it to a PHP or CGI, but I'm not sure what they are. HELP !!!!

Here you go, try this...

http://www.dreamweaverclub.com/dreamweaver-php-form.php

It's PHP to do the job.

K.Simmonds
06-11-2009, 04:46 PM
Hi. Thanks for taking the time. I've read your reply over and over .......... and I'm thicker than I thought. I just get more and more lost. I need to have it explained to me like I'm the imbecile that I am. I've heard about PHP and CGI bins .... but I'm completely self taught, and I have no idea what they are or what to do with them. In desperation I have copied the code from my form. I know you are too busy but if some time you could tell me what to do with it (keep it clean).

________________________________________________


<table width="593" border="0">
<tr>
<th width="219" scope="col"><div align="left" class="style40">Title</div></th>
<th width="364" scope="col">
<div align="left">
<select name="select" id="select">
<option selected="selected">Mr</option>
<option>Mrs</option>
<option>Miss</option>
</select>
<input name="hiddenField" type="hidden" id="hiddenField" value="&lt;input type=&quot;hidden&quot; name= &quot;sendto&quot; value=&quot;keith@glendalehouse.co.uk&quot;&gt (value=%22keith@glendalehouse.co.uk%22%3E);" />
</div></th>
</tr>
<tr>
<th scope="col"><div align="left" class="style40">Name</div></th>
<th scope="col"><div align="left">
<label>
<input type="text" name="Name2" id="Name2" />
</label>
</div></th>
</tr>
<tr>
<th valign="top" scope="col"><div align="left" class="style40">Address</div></th>
<th scope="col"><div align="left">
<label>
<textarea name="Address" id="Address" cols="45" rows="5"></textarea>
</label>
</div></th>
</tr>
<tr>
<th scope="col"><div align="left" class="style40">Telephone</div></th>
<th scope="col"><div align="left">
<label>
<input type="text" name="Telephone" id="Telephone" />
</label>
</div></th>
</tr>
<tr>
<th scope="col"><div align="left" class="style40">Email</div></th>
<th scope="col"><div align="left">
<label>
<input type="text" name="email" id="email" />
</label>
</div></th>
</tr>
<tr>
<th scope="col"><div align="left" class="style40">Dates Req'd (Arrival day)</div></th>
<th scope="col"><div align="left">
<label>
<input type="text" name="Start date" id="Start date" />
</label>
</div></th>
</tr>
<tr>
<th scope="col"><div align="left" class="style40">Dates req'd (Leaving day)</div></th>
<th scope="col"><div align="left">
<label>
<input type="text" name="Leaving day" id="Leaving day" />
</label>
</div></th>
</tr>
<tr>
<th scope="col"><div align="left" class="style40">Number of adults</div></th>
<th scope="col"><div align="left">
<label>
<select name="Adults" id="Adults">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
</select>
</label>
</div></th>
</tr>
<tr>
<th scope="col"><div align="left" class="style40">Number of children</div></th>
<th scope="col"><div align="left">
<label>
<select name="Children" id="Children">
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
</label>
</div></th>
</tr>
<tr>
<th valign="top" scope="col"><div align="left" class="style40">Any additional information?</div></th>
<th scope="col"><div align="left">
<label>
<textarea name="Additional info" id="Additional info" cols="45" rows="5"></textarea>
</label>
</div></th>
</tr>
<tr>
<th height="72" valign="top" scope="col">&nbsp;</th>
<th scope="col"><label>
<input type="submit" name="send" id="send" value="send" />
</label></th>
</tr>
</table>


___________________________________________

<form id="Two Hoots Enquiry Form" name="Two Hoots Enquiry Form" method="post" action="">
</form>

edbr
06-12-2009, 02:44 AM
a form wil start with <form action="".... you need to specify where the form imformation will be sent. in this case it needs to be sent to the form handler. which is ie, the link suggested saved as a php page . that will collect the info from the filds as $_Post values and put them in a message and send it.

K.Simmonds
06-12-2009, 06:42 AM
Thanks again, but I still don't understand.

This is not fair. You understand all this - AND you're in the sun in Bali.
I'm as thick as 2 short planks ......... and I'm in the rain in Yorkshire.

edbr
06-12-2009, 07:10 AM
ok copy the form as in the link, change the values to your domain and email etc.
save it as sendmail.php
set your form action to sendmail.php

like this<form action="sendmail.php" method="post" name="mailform">
<input name="email" type="text" />
<input name="name" type="text" />
<textarea name="message" cols="20" rows="10"></textarea></form>

edbr
06-12-2009, 07:12 AM
i Know your suffering i was based for a short period in Leeds.

K.Simmonds
06-12-2009, 09:10 AM
You've given me an idea. Why don't I just take the form off the site ..... and give up trying to do websites?

I have to go to Leeds today .... but the sun is shining.

edbr
06-12-2009, 09:47 AM
na get stuck in , we will help

Lelmmossy
06-13-2009, 07:20 PM
Hello people

I am just a beginner in Dreamweaver and would like to know how i can edit
the jump menu.I would like to make something like the forum jump in this site with all the different font types and all.

scabro
06-14-2009, 09:16 AM
Try this site: Visitor forms with Dreamweaver CS4 (http://www.sebastiansulinski.co.uk/web_design_tutorials/tutorial/35/registration_login_password_reset_restrict_access_ and_md5)

K.Simmonds
06-14-2009, 06:36 PM
Hi again. I've been struggling all weekend and I think I've got a bit further. I've created a PHP file (called submit.php), and uploaded it. If you fill in the form on the website now ( http://www.twohoots.info/Pages/contact.html ), you get the message: Thankyou Mr, your name is, your address is, your post code is ...... etc. But - it still will not send me an email. What am I doing wrong. The code for the php file, for the form on the website, is below.

+++++++++++++++++++++++++++

<html>
<body>
Thank You <?php echo $_POST["Mr"]; ?> <?php echo $_POST["Name2"]; ?>. <br />
Your E-Mail is <?php echo $_POST["email"]; ?> <br />
Your Address is <?php echo $_POST["Address"]; ?> <br />
Your Post code is <?php echo $_POST["Post code"]; ?> <br />
Your Start Date is <?php echo $_POST["Start Date"]; ?> <br />
Your Leaving Date is <?php echo $_POST["Leaving Day"]; ?> <br />
Number of Adults is <?php echo $_POST["Adults"]; ?> <br />
Number of Children is <?php echo $_POST["Children"]; ?> <br />
Your comments were <br />
<?php echo $_POST["Additional info"]; ?> <br />
<?php

$SendEmail ="keith@glendalehouse.co.uk";
$message = $_POST["Mr"] . " <br /> " . $_POST["Name2"] . " <br />" . $_POST["email"] . " <br />" . $_POST['addr'] . $_POST["Post code"] . " <br />" . $_POST["Start Date"] . " <br />" . $_POST['Leaving Day'] . " <br />" . $_POST['Adults'] . "<br />" . $_POST['Children'] . " <br />" . $_POST['Aditional info'];
$body = <<< EOD
EOD;

$headers = "From: $emailField\r\n";
$headers .= "Content-type: text/html\r\n";
$sucess = mail($SendEmail, $emailSubject, $message, $headers, '-f'.$SendEmail);
?>

</body>
</html>

K.Simmonds
06-14-2009, 07:45 PM
I've been struggling with this all weekend, and I think I've got a bit further. I created a Php file, called submit.php, and uploaded it. When you fill in the form on the website ( http://www.twohoots.info/Pages/contact.html ) you get the message Thankyou Mr, your name is, your address is, your postcode is etc, but it still won't send me an email. The code I've written is below. What have I done wrong?


<html>
<body>
Thank You <?php echo $_POST["Mr"]; ?> <?php echo $_POST["Name2"]; ?>. <br />
Your E-Mail is <?php echo $_POST["email"]; ?> <br />
Your Address is <?php echo $_POST["Address"]; ?> <br />
Your Post code is <?php echo $_POST["Post code"]; ?> <br />
Your Start Date is <?php echo $_POST["Start Date"]; ?> <br />
Your Leaving Date is <?php echo $_POST["Leaving Day"]; ?> <br />
Number of Adults is <?php echo $_POST["Adults"]; ?> <br />
Number of Children is <?php echo $_POST["Children"]; ?> <br />
Your comments were <br />
<?php echo $_POST["Additional info"]; ?> <br />
<?php

$SendEmail ="keith@glendalehouse.co.uk";
$message = $_POST["Mr"] . " <br /> " . $_POST["Name2"] . " <br />" . $_POST["email"] . " <br />" . $_POST['addr'] . $_POST["Post code"] . " <br />" . $_POST["Start Date"] . " <br />" . $_POST['Leaving Day'] . " <br />" . $_POST['Adults'] . "<br />" . $_POST['Children'] . " <br />" . $_POST['Aditional info'];
$body = <<< EOD
EOD;

$headers = "From: $emailField\r\n";
$headers .= "Content-type: text/html\r\n";
$sucess = mail($SendEmail, $emailSubject, $message, $headers, '-f'.$SendEmail);
?>

</body>
</html>

gigiloumill
06-16-2009, 12:47 PM
K, did you figure it out? it's pretty simple.