Unknown column 'Test' in 'field list'

From: Date: Fri, 29 Mar 2002 01:31:00 +0000
Subject: Unknown column 'Test' in 'field list'
Groups: php.db 
Request: Send a blank email to php-db+get-18018@lists.php.net to get a copy of this message
Hi All! Hope I'm not bothering you nice people too much. I have a account called Test, when I click the submit button I get this error Unknown column 'Test' in 'field list' My table only has two fields id and user_name I am not trying to insert the data into the field Test but into usre_name. I had this problem once before but I can't remember how I fixed it or if I ever did. Any ideas? <?php if($action == "Submit my entry"){ if (!empty($name)){ $enter = "insert into entry (id, user_name) values (' ',$name)"; mysql_query($enter) or die(mysql_error()); } exit; } $query="SELECT name FROM users WHERE uid=".$session["uid"]; $ret = mysql_query($query) or die(myasql_error()); list($name) = mysql_fetch_array($ret); ?> <CENTER><table ALIGN="center" WIDTH="80%"><tr> <td><form ACTION="<?php echo($PHP_SELF);?>" METHOD=post> <?php print "<td><br>Username: <input type=\"text\" value=\"$name\" name=\"u_name\" size=30></td></tr>\n<tr><td>"; print "<input TYPE=\"submit\" name=\"action\" VALUE=\"Submit my entry\"><BR><BR>"; ?> </form></td></tr> </table></CENTER>

« previous php.db (#18018) next »