**Updated**
Hey i liked the code so i added a border around the table and made it look clearer. +1 though nice job
<?php
include "globals.php";
print "<font face='Arial' size='4'>Travel</font><hr width='95%'>";
$_GET['to'] = abs((int) $_GET['to']);
if(!$_GET['to'])
{
print "Welcome to the train station. Tickets cost $10,000.
Where would you like to travel?<hr width=95%>
";
$q=$db->query("SELECT * FROM cities WHERE cityid != {$ir['location']} AND cityminlevel <= {$ir['level']}");
print "<table cellspacing='1' border='0' cellpadding='3' class='table' width='95%'>
<th><font color=white>City</th>
<th>Description</th>
<th>Min Level</th>
<th>Travel?</th></font>
<tr>";
while($r=$db->fetch_row($q))
{
print "
<td>{$r['cityname']}</td>
<td>{$r['citydesc']}</td>
<td>{$r['cityminlevel']}</td>
<td>[url='travel.php?to={$r[']Travel[/url]</td></tr>";
}
print "</table>
";
print "<hr width='85%'>
By going to another city, you will be able to get newer faster updated
wepons and newer properties. You must travel from town to town
to attack your enimies.
<hr width='85%'>> [url='explore.php']Back[/url]<hr width='95%'>";
}
else
{
if($ir['money'] < 10000)
{
print " Sorry you don't have enough money.";
print "<hr width='85%'>> [url='explore.php']Back[/url]<hr width='95%'>";
}
else if( ((int) $_GET['to']) != $_GET['to'])
{
print "Sorry invalid city ID";
print "<hr width='85%'>> [url='explore.php']Back[/url]<hr width='95%'>";
}
else
{
$q=$db->query("SELECT * FROM cities WHERE cityid = {$_GET['to']} AND cityminlevel <= {$ir['level']}");
if(!$db->num_rows($q))
{
print "Sorry this city does not exist.";
print "<hr width='85%'>> [url='explore.php']Back[/url]<hr width='95%'>";
}
else
{
$db->query("UPDATE users SET money=money-10000,location={$_GET['to']} WHERE userid=$userid");
$r=$db->fetch_row($q);
print "You paid \$10,000 and travelled to {$r['cityname']} on the train, congratulations.";
print "<hr width='85%'>> [url='explore.php']Back[/url]<hr width='95%'>";
}
}
}
$h->endpage();
?>
To see it in action go to http://deathsrow.com,