well first of all PHP is very stable.... looks like either the book you purchased was not the best.. or you forgot to copy over one very important line of code
where in your code are you actually sending off the SQL to be processed?
mysql_select_db('ansi');
$query = "insert into ansi(ansi) values ('".$Description."')" ;
echo mysql_affected_rows().' ANSI inserted into database.';
you appear to select your database
then write your sql insert string into a variable
then as mysql how many rows were affected.
you need to actually ask mysql to process the directive in the string $query.. throw in this line before the mysql_affected_rows().
mysql_db_query($db, $query);
also remove the @... in php @ exists to suppress error messages... you may be ignoring a legit connection problem to your sql database.. while testing code you should usually leave off the @