Games Randomizer

Want to show the card names for non MyTCG games? Use this code to do so. You may need to change the card URL if you have your cards in folders.

$result=mysql_query("SELECT * FROM `$table_cards` WHERE `worth`='1'") or die("Unable to select from database.");
for($i=0; $i<4; $i++) {
$digits = rand(01,$row['count']);
if ($digits < 10) { $_digits = "0$digits"; } else { $_digits = $digits;}
$card = "$row[filename]$_digits";
echo "<img src=\"$tcgcardurl$card.png\" border=\"0\" /> ";
$rewards .= $card.", ";
$rewards = substr_replace($rewards,"",-2);
echo "<br /><b>Game Name:</b> $rewards";