In my PHP code, I get this error on line 12 whenever I try to run it. (Code below ((obviously))
It tells me that mysql_fetch_object(): is not a valid MySQL result resource, but I have tried 4 PHP syntax checkers and all is well.
Thank you, and please help, thanks!
This is my code that I believe contains the error
<?
$connection = mysql_connect('localhost', 'socialli_main2', 'password+', `'socialli_main');
mysql_select_db(`Users`);
$ID = mysql_real_escape_string(strip_tags(stripslashes($_GET['ID'])));
$Username = mysql_real_escape_string(strip_tags(stripslashes($_GET['Username'])));
if (!$Username) {
$getUser = mysql_query("SELECT * FROM Users WHERE ID='".$ID."'");
}
else {
$getUser = mysql_query("SELECT * FROM Users WHERE Username='".$Username."'");
}
$gU = mysql_fetch_object($getUser);