Brad
Well-Known Member
Ok so I've created a automatic feature like lottery were it should pick a random ticket number or username but seems not to show anything
thanks in advance.
PHP:
<?php
$n1 = dbquery("SELECT * FROM lottery_tickets WHERE username = '" . TICKET . "'"); ?>
<?php
if(isset($_POST['pick']))
{
$N1 = rand('" . TICKET . "');
$WINNER = mysql_fetch_assoc(dbquery("SELECT username FROM lottery_tickets WHERE username = '". $N1 ."'"));
if($WINNER['username'] == ""){ $WINNER['username'] = "NONE"; }
fMessage('ok', 'Winner: <b>'. $WINNER['username'] .'</b> ('. $N1 .')');
} ?>
thanks in advance.