I am trying to add some extra fields in my database, and have a form so users can input data on account creation. I am getting the "Cannot create user" error. I think it's a problem with the mySql query.
$db->query('INSERT INTO '.$db->prefix.'users (username, group_id, password, email, email_setting, save_pass, timezone, language, style, registered, registration_ip, last_visit, picurl, charname, type) VALUES(\''.$db->escape($username).'\', '.$intial_group_id.', \''.$password_hash.'\', \''.$email1.'\', '.$email_setting.', '.$save_pass.', '.$timezone.' , \''.$db->escape($language).'\', \''.$pun_config['o_default_style'].'\', '.$now.', \''.get_remote_address().'\', '.$now.'\', '.$picurl.'\', '.$charname.'\', '.$type.')') or error('Unable to create user', __FILE__, __LINE__, $db->error());
$db->query('INSERT INTO '.$db->prefix.'users (username, group_id, password, email, email_setting, save_pass, timezone, language, style, registered, registration_ip, last_visit, picurl, charname, type) VALUES(\''.$db->escape($username).'\', '.$intial_group_id.', \''.$password_hash.'\', \''.$email1.'\', '.$email_setting.', '.$save_pass.', '.$timezone.' , \''.$db->escape($language).'\', \''.$pun_config['o_default_style'].'\', '.$now.', \''.get_remote_address().'\', '.$now.'\', '.$picurl.'\', '.$charname.'\', '.$type.')') or error('Unable to create user', __FILE__, __LINE__, $db->error());
Any help would be GREATLY appreciated