If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the largest domain name community on the internet and continues to grow every day. There are over 105,000 domainers on DNForum doing everything from buying domains, selling domains, learning about domains and discussing domains. Take a minute and Register.
Register Today on DNForum IT'S FREE!I am building a simple contact form and wondering if i could get some help.
I want it to be a series of questions
form.html
<form method="post" action="sendmail.php">
Name: <input name="name" type="text" /><br />
Email Address: <input name="email" type="text" /><br />
Question 1:<br />
<textarea name="q1" rows="15" cols="40">
</textarea><br />
Question 2:<br />
<textarea name="q2 rows="15" cols="40">
</textarea><br />
<input type="submit" />
</form>
what does the sendmail.php have to look like i am having trouble getting this to work. i have tried a few things.
<?php
$name = $_REQUEST['name'] ;
$email = $_REQUEST['email'] ;
$q1 = $_REQUEST['q1'] ;
$q2 = $_REQUEST['q2'] ;
mail( "my@emailaddress.com", "Feedback Form",
$message, "From: $email" );
?>
Thanks in advance
Your form method is "post". This means that all data passed by the form to sendmail.php will be in the $_POST array.
Try
further, if this is to be used on a live/production website, sendmail.php should NOT be as simple as that - you will have to sanitize and validate all of the user entered data.Code:$name = $_POST['name'];
www.musicdownloads.tv for sale, taking offers.
Feel free to PM me with any other PHP (and web tech) related questions - I'd be happy to help.
www.musicdownloads.tv for sale, taking offers.
Bookmarks