What needs doing is that i want to change the "Taken by" and change it to "taken by {username}"
but the problem is if i type in "{username}" it will obv show the user who is onlien right now viewing the page.
so i need to make a sql or something to show the "username" from the database table colum.
the database table name is "vault" and the colum i need to get the username from is "Username"
can anybody help me tranform this picture below to the one beside it on the right had side..
heres the code of what needs editing to show the username that won the item..
but the problem is if i type in "{username}" it will obv show the user who is onlien right now viewing the page.
so i need to make a sql or something to show the "username" from the database table colum.
the database table name is "vault" and the colum i need to get the username from is "Username"
can anybody help me tranform this picture below to the one beside it on the right had side..
heres the code of what needs editing to show the username that won the item..
PHP:
<?php
$getPrizes = mysql_query("SELECT * FROM vault WHERE display = 1 ORDER BY Prize ASC");
while($Prizes = mysql_fetch_assoc($getPrizes))
{
if($Prizes['Username'] == 'None')
{
$Status = "<font color='green'><strong>This items not been won yet!</strong></font>";
} else {
$Status = "<font color='red'><strong>Taken by {Username}</strong></font>";
}
echo '<tr><td><strong>' . $Prizes['Prize'] . '</strong></td><td>' . $Status . '</strong></td><td>' . $username . '</td></tr>';
}
?>