I have created a program where it displays the data from the database and it will also display what is enter in the form. There are 3 php files with the program. create.php, index.php and connection.php. A folder called mysqltut is created and within that is the folder includes. Includes folder has connection.php(/var/www/html/mysqltut/includes/connection.php, and create.php and index.php is in /var/www/html/mysqltut Index.php page displays the rows from the database
but does not add to the list when the user adds name and desc.
connection.php
<?php
$dbhost='localhost';
$dbuser = 'root';
$dbpass = '888888';
$db = 'mysql_tut';
$conn = mysql_connect($dbhost,$dbuser,$dbpass);
mysql_select_db($db);
?>

index.php
<?php
include 'includes/connection.php';

$query = "SELECT * FROM people";

$result = mysql_query($query);

while($person = mysql_fetch_array($result)) {
echo "<h3>".$person["Name"] . "</h3>";
echo "<p>".$person["Description"] ."</p>";
}
?>
<h1>Create A User</h>
<form action="create.php" method="post">
Name<input type="text" name="inputName" value=""/><br />
Description<input type="text" name="inputDesc" value=""/>
<br />
<input type="submit" name="submit" />
</form>


create.php
<?php
include 'includes/connection.php';

$name = $_POST['inputName'];
$desc = $_POST['inputDesc'];

if (!$_POST['submit']) {
echo "please fill out the form";
header ('Location: index.php');
}else {
mysql_query = ("INSERT INTO people (`ID`, `Name`, `Description`)
VALUES (NULL, '$name', '$desc')") or die (mysql_error());
echo "User has been added!";
header('Location:index.php');

}

?>