Im getting this error from a page im building: Parse error: syntax error, unexpected T_VARIABLE in C:\xampp\htdocs\llot.php on line 133
Line 133 = $db = "INSERT INTO `lottery` (`id`, `username`, `num`) VALUES ('$uid','$id','$finalnum');"
so what could be causing this? and a...
uhm im getting this error now: Parse error: syntax error, unexpected T_VARIABLE in C:\xampp\htdocs\llot.php on line 133
Line 133 =
$db = ("INSERT INTO `lottery` (`id`, `username`, `num`) VALUES ('$uid','$id','$finalnum');");
so i could do this:
if(isset($_POST['buttonname'])
{
$db = "INSERT INTO `lottery` (`id`, `username`, `num`) VALUES ('$uid','$id','$finalnum');"
$db2 = "UPDATE `users` SET `lotto_points`='0' WHERE (`id`='$uid');"
}
else
Im making a lotto system, and I have made most of the code but I just cant figure out how to send the SQL query into the DB to record the number that user choose/and to remove the appropriate number of lotto points(made a currency as well).
The query codes are:
<?php
$db =...
so i was wondering if someone could make a php code to run an SQL query when the user clicks a button. I have written the sql query in php already i just have no clue how to excute it, also could someone tell me if this php code works? :
$Suser = ('"/userme.php"');
^^^^^^^^^ this code is to...
Im getting this SQL error:
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource
Notice: Trying to get property of non-object in
$row = mysql_fetch_object($credits);
$credits = $row->credits;
Im coding a simple lottery system if your...
im making a lottery system and im getting this error:
mysql_fetch_object(): supplied argument is not a valid MySQL result resource
the line thats causing it is:
$credits = mysql_query("SELECT * FROM users WHERE `id` = '$id'");
$row = mysql_fetch_object($credits); << this...