1<?php
2$host = "localhost";
3$username = "username";
4$pass = "";
5$db="furniture";
6
7
8// Create connection
9$conn=mysqli_connect($host,$username,$pass,$db);
10
11if(!$conn){
12 die("Data connection error");
13}
14?>
1<!DOCTYPE html>
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5<title>Contact Form - PHP/MySQL Demo Code</title>
6</head>
7
8<body>
9<fieldset>
10<legend>Contact Form</legend>
11<form name="frmContact" method="post" action="contact.php">
12<p>
13<label for="Name">Name </label>
14<input type="text" name="txtName" id="txtName">
15</p>
16<p>
17<label for="email">Email</label>
18<input type="text" name="txtEmail" id="txtEmail">
19</p>
20<p>
21<label for="phone">Phone</label>
22<input type="text" name="txtPhone" id="txtPhone">
23</p>
24<p>
25<label for="message">Message</label>
26<textarea name="txtMessage" id="txtMessage"></textarea>
27</p>
28<p> </p>
29<p>
30<input type="submit" name="Submit" id="Submit" value="Submit">
31</p>
32</form>
33</fieldset>
34</body>
35</html>
36