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

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?

if($action == "Submit my entry"){
if (!empty($name)){
$enter = "insert into entry (id, user_name) values (' ',$name)";
mysql_query($enter) or die(mysql_error());
$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>

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

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to