Namtip Posted August 16, 2010 Share Posted August 16, 2010 I'm running XAMPP 1.7.3, so that means I have Apache 2.2.14 (IPv6 enabled), MySQL 5.1.41 + PBXT engine, PHP 5.3.1 on a windows OS. My problem: Warning: extract() expects parameter 1 to be array, boolean given in C:\x\xampp\htdocs\profile_update.php on line 90. When my page tries to upload some user profile variables. It also incorrectly thinks its not signed in... What my half wit mind thinks at 4:47 in the morning: I've checked phpmyadmin and the column for the profile hasn't been uploaded! Does an end user have to enter info via forms for a column to be entered into the db or can I get php to make some empty columns through the registration form like I've done with the following script?? $query = 'INSERT INTO site_user (user_id, username, password) VALUES (NULL, "' . mysql_real_escape_string($username, $db) . '", ' . 'PASSWORD("' . mysql_real_escape_string($password, $db) . '"))'; $result = mysql_query($query, $db) or die(mysql_error()); $user_id = mysql_insert_id($db); $query = 'INSERT INTO site_user_info (user_id, first_name, last_name, email, address, city, county) VALUES (' . $user_id . ', ' . '"' . mysql_real_escape_string($first_name, $db) . '", ' . '"' . mysql_real_escape_string($last_name, $db) . '", ' . '"' . mysql_real_escape_string($email, $db) . '", ' . '"' . mysql_real_escape_string($address, $db) . '", ' . '"' . mysql_real_escape_string($city, $db) . '", ' . '"' . mysql_real_escape_string($county, $db) . '")'; $result = mysql_query($query, $db) or die(mysql_error()); $user_id = mysql_insert_id($db); $query = 'INSERT INTO site_user_profile (user_id, about_me, employment, education, contact) VALUES (' . $user_id . ', ' . '"' . mysql_real_escape_string($about_me, $db) . '", ' . '"' . mysql_real_escape_string($employment, $db) . '", ' . '"' . mysql_real_escape_string($education, $db) . '", ' . '"' . mysql_real_escape_string($contact, $db) . '", ' . $result = mysql_query($query, $db) or die(mysql_error()); If you need any more information I'd be happy to give you more but I'm gonna hit the sack for a few hours. I'll link you the code for the sign in error if needed when I'm awake. Thanks guys, you're super troopers, all of you. Quote Link to comment https://forums.phpfreaks.com/topic/210821-registration-problems-missing-column-and-not-signed-in/ Share on other sites More sharing options...
trq Posted August 16, 2010 Share Posted August 16, 2010 You might want to post the relevant code pertaining to the error. Quote Link to comment https://forums.phpfreaks.com/topic/210821-registration-problems-missing-column-and-not-signed-in/#findComment-1099746 Share on other sites More sharing options...
Namtip Posted August 16, 2010 Author Share Posted August 16, 2010 How would I find the code which causes the error? I'm sorry I'm a newbie at coding. I'm not so concerned about the lines where the error message occurs because I believe the root of the issue lies in the way the registration scripts have entered the data into mysql. I now have 1 entry in the site_user table. 2 duplicate entries for site_user_info table and 0 entries for site_user_profile. I need 1 entry in all of the tables. I have not given the user a form to enter data into site_user_profile(I was hoping to give them an update form a couple of pages later). Is that possible? I'm sorry If i infuriate you with my stupidity. Quote Link to comment https://forums.phpfreaks.com/topic/210821-registration-problems-missing-column-and-not-signed-in/#findComment-1099821 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.