Try this It hink it's because you are doing your connection inside of the mysql_query()
Since you have already established a connection in your dbconnect script use:
$result = mysql_query($sql);
$record_added = mysql_affected_rows($result);
echo "Records added: $record_added";
to make sure there's some output.
If you no longer have the connection at this point do another pconnect NOT a mysql_query connect (sorry didn't go through all your code).
HTH