- Joined
- Aug 19, 2007
- Messages
- 4,941
- Solutions
- 11
- Reaction score
- 352
PHP:
<?PHP
$lottery = $SQL->query('SELECT `lottery`.`name` FROM `lottery` ORDER BY `lottery`.`id` DESC LIMIT 1;');
$main_content .= '<center><h1>Lottery</h1></center><center>Every 3 hours we will choose one player who will win 100k!<br />';
if($lottery->rowCount())
{
$data = $lottery->fetch();
$main_content .= 'Last Winner: <a href="?subtopic=characters&name='.urlencode($data['name']).'">'.$data['name'].'</a> Congratulations!</center>';
}
else
$main_content .= 'No winners were drawn yet.';
?>
Last edited: