PDA

View Full Version : Can anyone help? - Problem - sending/submitting a form using Dreamweaver


richdesign
06-29-2009, 05:52 PM
:( Hi all,

I have a problem with a customer send form in dreamweaver. Basically you can type in customer details ie name, address etc etc. When you go to send customer details, the send button doesn't work . Can someone help with this coding issue...?

Please see script below:
(i really appreciate some help with this problem)
Best - Rich.


<td><input name="Button" type="button" value="Send Details" /></td>
</tr>
</table></th>
<th valign="top" scope="row"><p>
<?php if(isset($_POST['patEmail'])){

$todayis = date("l, F j, Y, g:i a") ;

// $attn = $_POST['attn'] ;

$visitorname = $_POST['patName'];
$visitor = $_POST['patEmail'];
$telNum = $_POST['patTel'];
$mobNum = $_POST['patMob'];
$address = stripslashes($_POST['patAddress']);
$notes = stripslashes($_POST['patQuery']);
$subject = "Email from from $visitorname";
$message = " $todayis [EST] \nFrom: \n$visitorname ($visitor)\n\nTel: \n$telNum \n\nMob: \n$mobNum \n\nAddress: \n$address \n\n\n Message: \n$notes \n

";

$from = "From: $visitor\r\n";
$sendto = "info@";

mail($sendto, $subject, $message, $from);
?>
</p>
<p>
<?php } else { ?>
</p>
<table>
<tr>

Corrosive
06-29-2009, 06:29 PM
I'm sure someone will correct me if I'm wrong but doesn't the button have to have code like...

type="submit"

rather than

type="button"

You also seemed only to have pasted half the code. It may be an issue with your form action as well.