Simple Contact Form

1. Make a new directory in your website and called it "contact"

2. Open a new text document, and place the following code into it

<form method="post" action="send.php">
<INPUT TYPE="TEXT" value="[email protected]" NAME="email" size=20>

<INPUT TYPE="TEXT" value="Subject" NAME="subject" size=20>

<TEXTAREA NAME="comments" value="Your Message Here" ROWS=5 COLS=20>Your Message Here</TEXTAREA>

<input type="submit" name="submit" value="Email Me!"> <input type="reset" name="reset" value="Reset">

</form>

Save the file as contact.php and upload it into the same directory and you made earlier (step 1)

3. Make another text document, and insert the following code:

<?php
mail("[email protected]", "$subject", "$email", "$comments");
echo("Thanks $email!
\nBelow shows what was sent

\nSubject: $subject

Email: $email
\nMessage: $comments");
?>

Save that as send.php

4. In that last bit of coding, edit "[email protected]" to show your email address, and your done!

By Arnab Ghosh,
Admin,Mod Studio India.