i'm sure it's quite easy to find but... i cant >_<
it displays the 'sucess' message but it doesn't insert into the database....
if ($_POST['buy']) {
$sql="UPDATE `users` SET `banked` = `banked` - 5 WHERE `userid` = '".$user."'";
$result=mysql_query($sql);
$sql="INSERT INTO `lotto` (null, user, null, null)VALUES(null, '$user', null, null)";
$result=mysql_query($sql);