ok in the process of developing a new site in replace of my old site(on the same host and mysql sever if that helps any) I got "Unknown column 'user_id' in 'field list'" as a database error message for this code:
if ($a AND $b AND $c AND $d AND $e AND $f) {
$query = "SELECT user_id FROM user_profile WHERE user_name = '$HTTP_POST_VARS[user_name]'"; //it won't go past this point!!!!!!!!//
$db_query= @mysql_query($query) or die (mysql_error());
$row = @mysql_fetch_array($db_query) or die (mysql_error());
if ($row){
$message = "That username is already taken. Please select another.
";
} else {
$query2 = "INSERT INTO user_profile (username, password, permission, first_name, last_name, email, site, first_login) VALUES ('$HTTP_POST_VARS[user_name]', '$password', '!', '$HTTP_POST_VARS[first_name]', '$HTTP_POST_VARS[last_name]', '$HTTP_POST_VARS[email]', '$HTTP_POST_VARS[website]', '$timestamp')";
$query_db2 = mysql_query($query2) or die (mysql_error());
now, I'm 100% sure this feild exists, and 100% sure i'm connected to the database
any help would be much appreciated, thank you
|