Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts

HTML & PHP - Make a funtioning contact form

Today, i'll make tutorial how to make a funtioning contact form. You can view sample by viewing my blog contact page.

First : The HTML 5 code.

<form action="the-php-file-url-here" enctype="multipart/form-data" id="myForm" method="post">
<fieldset>
<legend>Personal information</legend>
<label for="name">Name</label>
<input id="name" maxlength="50" name="name" size="50" type="text" value="" />
<label for="email">E-mail</label>
<input id="email" maxlength="50" name="email" size="50" type="text" value="" />
<label for="website">Website</label>
<input id="website" maxlength="50" name="website" size="50" type="text" value="" /></fieldset>

<fieldset>
<legend>Message</legend>
<label for="subject">Subject</label>
<input id="subject" maxlength="50" name="subject" size="50" type="text" value="" />
<label for="message">Yout Message</label>
<textarea cols="50" id="message" name="message" rows="5"></textarea></fieldset>

<fieldset>
<input class="button" name="send" type="submit" value="Send Message" /><input class="button" name="reset" type="reset" value="Clear From" /></fieldset>
</form>


Change the 'the-php-file-url-here' to your php file url. Embed this code to your contact page.

Second : The PHP file.



Write by Arafa Daming