April 3, 201115 yr Hello Im having trouble with a website Im working on with Dreamweaver.. Im an amateur web builder and Im building a site for my sister. She would like me to create a form on the web page so that people can forward comments, or ask various questions to my sisters email address. But how? I have the Form created and Ive read on here that Il need a PHP Page? So do I create a PHP Page and use this script: (which I always found on here) <?php $subject ="$subject"; $message="$detail"; $mail_from="$customer_mail"; $header="from: $name <$mail_from>"; // Enter your email address $to ='someone@somewhere.com'; $send_contact=mail($to,$subject,$message,$header); if($send_contact){ echo "We've recived your contact information"; } else { echo "ERROR"; } ?> If I use this script on a new PHP Page, how do I link it to my form page? Sorry for being such a newbie but Its my first website... Thanks for any help Edited April 3, 201115 yr by Ryan777
April 3, 201115 yr In the html of your form at the very start of your form you will need to add an action as below <form action="yourphp.php" so when you press the submit button the form knows where to send the data I am sure some of the php gurus will come along and tell you that the php code you have will probably generate a lot of spam, so possibly google captcha which is a code that will reduce spam Pat
Create an account or sign in to comment