I haven't used PHP or SQL in a while, and can't seem to figure out why this query is failing. Probsbly going to be something silly :).
<php?
$dbconn = mysql_connect("localhost","xxx","xxx");
if (!$dbconn)
{
die('Error connecting to DB!');
}
if (! @mysql_select_db('rdrkictj_rsvp') )
{
die(mysql_error());
}
if(isset($_GET['id'])){
$ID = $_GET['id'];
$stockcount = $_GET['stockcount'] - 1;
}
else
die(mysql_error());
mysqli_query($dbconn,'UPDATE products SET stockcount = "5" WHERE id = "1"');
mysqli_close($dbconn);
?>
I receive the following errors:
Warning: mysqli_query() expects parameter 1 to be mysqli, resource given in /home/rdrkictj/public_html/test/buyit.php on line 19
Warning: mysqli_close() expects parameter 1 to be mysqli, resource given in /home/rdrkictj/public_html/test/buyit.php on line 21
Any advice would be greatly appreciated.