Dynadot — .com Transfer

Forms in HTML/PHP ?

SpaceshipSpaceship
Watch

Veolus

Account Closed
Impact
13
Anyone know about any tutorials on creating forms in HTML / PHP ??
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
hey this should work, it does for me


contact.html

<form action="mail.php" method="POST">
<input type="text" name="name" value="name" size="40">
<input type="text" name="email" value="Your Email Address" size="40">
<textarea name="comments" value="comments"></textarea>
<input type="submit" value="Send" ><input type="reset" value="Reset" >
</form>

mail.php

PHP:
<?
$to = "[email protected]";
$name = $_POST['name'];
$email = $_POST['email'];
$comments = $_POST['comments'];
$message = "Hey $name sent you this message:\n\n$comments\n\n there email is: $email";

if (mail($to,$subject,$message)) {

echo "Thank you for your message";

}else{

echo "sorry they email couldnt be sent";
}
?>


hope it helps


dx3k
 
0
•••
Thanks dx3k that help's big time! :)
 
0
•••
Appraise.net

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back