Hi,
Can someone please tell me why this code isn't working? I think it must be a fault in the SQL, as no errors are being returned about connecting to the database. The code is:
$link = mysql_connect ($dbServer, $dbUser, $dbPass) or die ('Unable to connect - Please check your db settings.');
mysql_select_db ($dbName, $link) or die
('The database specified in database_name must exist and must be accessible by the user specified in mysql_connect');
$sql ="Update forums set name='$name', description='$description', parent=$parent, display=$display, table_name='$table', moderation='$moderation', mod_email='$mod_email', check_dup=$check_dup, multi_level=$multi_level, collapse=$collapsed, flat=$rflat, staff_host='$staff_host', html='$html', table_width='$table_width', table_header_color='$table_header_color', table_header_font_color='$table_header_font_color', table_body_color_1='$table_body_color_1', table_body_color_2='$table_body_color_2', table_body_font_color_1='$table_body_font_color_1', table_body_font_color_2='$table_body_font_color_2', nav_color='$nav_color', nav_font_color='$nav_font_color', allow_uploads='$allow_uploads' where id='$phorumid'";
mysql_query($sql, $link);
echo("Your phorum has been updated");
It chucks up no errors, but the database still isn't updated. The $phorumid is being called OK, and if I do echo($sql) then it looks fine.
In case it matters, magic_quotes_gpc is on.
TIA,
Peter