The following 3 mysql/php statements are used in my home page to
access my admin table:
$php_linkID = mysql_pconnect( "localhost","us er","pw");
mysql_select_db ("test_db",$php _linkID);
$php_resultID = mysql_query("SE LECT * FROM admin", $php_linkID);
On another web page I try to use another table in the same database
but I get an error on the if statement - I've saved the $php_linkID as
a session variable from the home page thinking I can just use it here
on a different web page - is this not possible?
$php_resultID = mysql_query("UP DATE controls SET screen_width =
frm_screen_widt h WHERE id = $php_session_me mber_name, $php_linkID);
if ($php_resultID != FALSE) <------ errors here
{
print "Database update error - Changes not made.";
}
else
{
print "My Controls successfully updated!";
}
access my admin table:
$php_linkID = mysql_pconnect( "localhost","us er","pw");
mysql_select_db ("test_db",$php _linkID);
$php_resultID = mysql_query("SE LECT * FROM admin", $php_linkID);
On another web page I try to use another table in the same database
but I get an error on the if statement - I've saved the $php_linkID as
a session variable from the home page thinking I can just use it here
on a different web page - is this not possible?
$php_resultID = mysql_query("UP DATE controls SET screen_width =
frm_screen_widt h WHERE id = $php_session_me mber_name, $php_linkID);
if ($php_resultID != FALSE) <------ errors here
{
print "Database update error - Changes not made.";
}
else
{
print "My Controls successfully updated!";
}
Comment