Here is a little bit of the code that generates a number based on retrieving the largest number from the field Number. However when it inserts it in, the Number value is 0.
here is the code:
<?php
SESSION_start();
include("dbcon.php");
dbcon();
$user = mysql_real_escape_string($_POST['user']);
$content = mysql_real_escape_string($_POST['content']);
$date = mysql_real_escape_string($_POST['date']);
$user2 = str_replace(".", " ", $user);
$query = "SELECT MAX(Number) FROM wall";
$query_config = mysql_query($query) or die(mysql_error());
$query_results_Number = mysql_fetch_array($query_config);
$new_Number_value = $query_results_Number++ ;
mysql_query("INSERT INTO `wall` (`user`, `from`, `content`, `date`, `Number`) VALUES('$user', '$user2', '$content', '$date', '$new_Number_value')")
or die(mysql_error());
echo "<h1>Your post was successful</h1>";
echo "This page will be re-directed back to your wall in 5 seconds";
header('Refresh: 5; url=yourwall.php');
?>