PHP contact form
This page is for code for a basic PHP contact form.
PHP can be compared to a filter as it takes input from a file or stream containing text and/or PHP instructions and outputs another data; HTML is the most common output. It can automatically identify the language of the user. One who has ever created any HTML page or started dynamic web programming, has already met with forms. Forms are special components which allow the site visitors to add information on the HTML page. A PHP form on a web page allows a user to enter data that is sent to a server for processing. For instance, almost each company web site contains a contact form, so that visitors can send a message to the site owner. Such a contact form usually contains several fields - for the visitor’s name, for the email address and one for the main message. PHP forms resemble paper forms because internet users fill out the forms using checkboxes, radio buttons, or text fields. For example, the forms can be used to enter shipping or credit card data to order a product or can be used to retrieve data. When dealing with HTML forms and PHP it is necessary to remember that any form element in HTML page will automatically be available to the PHP scripts.
<form>
<table>
<tr>
<td>Name *</td>
<td><input type="text"></td>
</tr>
<tr>
<td>Email *</td>
<td><input type="text"></td>
</tr>
<tr>
<td>Phone</td>
<td><input type="text"></td>
</tr>
<tr>
<td>Field_check</td>
<td>
<input type="checkbox" value="1"><label>Check_1</label><br>
<input type="checkbox" value="2"><label>Check_2</label><br>
<input type="checkbox" value="3"><label>Check_3</label>
</td>
</tr>
<tr>
<td>Message *</td>
<td><textarea rows="5"></textarea></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td><input type="button" id="subbut" value="Submit"></td>
</tr>
</table>
</form>
Web Hosting Wiki article text shared under a Creative Commons License.
