FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


question : how to make a form on dreamweaver?





engeland
Ive seen those forms which you fill up and hit the 'send' button in many website. Is there a good tutorial on this?

i have no idea, how to create a form at all.

I'd like to have one on my site which, once "send" is hit, the information put in the text area is sent to my email. how do i do this? Confused
Nutorious
You will need to learn PHP for that I THINK this is right (correct me if im wrong)

<?
function checkOK($field)
{
if (eregi("\r",$field) || eregi("\n",$field)){
die("Invalid Input!");
}
}

$name=$_POST['name'];
checkOK($name);
$email=$_POST['email'];
checkOK($email);
$comments=$_POST['comments'];
checkOK($comments);
$to="Youremailaddress@blahblah.com";
$message="$name just filled in your comments form. They said:\n$comments\n\nTheir e-mail address was: $email";
if(mail($to,"Comments From Your Site",$message,"From: $email\n")) {
echo "Thanks for your comments your email should be dealth with, within 24hours.";
} else {
echo "There was a problem sending the mail. Please check that you filled in the form correctly.";
}
?>

Thats the php then you need the html which is

<form action="mail.php" method="post">
Your Name: <input type="text" name="name"><br>
E-mail: <input type="text" name = "email"><br><br>
Comments<br>
<textarea name="comments"></textarea><br><br>
<input type="submit" value="Submit">
</form>

I am also learning php and mysql...
engeland
wow this really works!!! thanx! but im still trying to figure out how to add more text areas though. any tips? Smile
n-myster
text box's are too easy so here is how to make on

put this code in

input type="text" size="45" name="full name" value="Your Full name here" onFocus="this.value=''"<br><br>

but with the < and > at the start and beginning

this will make a simple text boix like so

<input type="text" size="45" name="full name" value="Your Full name here" onFocus="this.value=''"><br><br>
n-myster
wht the hellllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll


this is wierrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrd


Confused Confused Confused Confused Confused Confused Confused Confused Confused Confused Confused Confused
Related topics
html form help needed
Help me please...frontpage help needed!
wierd Dreamweaver Problem
Changements to the Points/frih$ system (Discuss)
creating guestbooks (form) with php & mysql
question aux codeurs ! php noob InsiDe!!
Interview Tips: Handling Difficult Question
Mod Projects lots of info
New Stupid User Question
Need PHP mail() help
Forum Question
Really noob question...
Question about resolutions
Making a mail-to form in dreamweaver (read more)
Reply to topic    Frihost Forum Index -> Webmaster and Internet -> Design Tips

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.