Try to change quotes with backticks in the field names of the INSERT statement, as here:
$req = "INSERT INTO $tablename(`$tablecol`) VALUES ('$tablecoldat')";
Also, to catch an error use mysql_error() at least in this stage:
mysql_query($req, $connection) or die(mysql_error());
cereal
Veteran Poster
1,144 posts since Aug 2007
Reputation Points: 344
Solved Threads: 221
Skill Endorsements: 22
Question Answered as of 3 Months Ago by
cereal