Hello everyone, I am having a problem traveling from city to city. My main city is Ovendale, and in order to leave this city you must travel outside the West gate, which is a tab i have added. Now when they get to the Gremish Forest, I want this location to be posted to my players in the database, so when they log back in they log in there. However, the problem I am having is that I don't know how to tell the code... hey this is Gremish Forest... show this new information for gremish forest. I want it now to say instead of Leave the West Gate to Travel out the Eastern side of the Forest. Can anyone help?
<?php
include_once 'connect.php';
session_start();
include_once 'logo.php';
?>
<link href="style.css" rel="stylesheet" type="text/css" />
<div id="login2" div align="center">
<?php
if (isset($_SESSION['player']))
{
$player=$_SESSION['player'];
}
else
{
echo "Not Logged in <br><br> <A href='login.php'>Login</a>";
exit;
}
$bypass = 0;//////////////////add this line
?>
</div>
<?php
$playerinfo="SELECT * from players where name='$player'";
$playerinfo2=mysql_query($playerinfo) or die("could not get player stats!");
$playerinfo3=mysql_fetch_array($playerinfo2);
include_once 'statpanel.php';
?>
<div id ="locations">
<?php
$playerhp = $playerinfo3['hpoints'];
if ($playerhp < 1)
{
echo "You are dead!" ;
echo "<br><a href='useitem.php'>Use an Item";
exit;
}
if(isset($_GET['map']))
{
$bypass=1;
echo "<a href='index.php?mapchange=1&mapname=Ovendale'>Ovendale</a><br>";
echo "<a href='index.php?mapchange=1&mapname=Gremish Forest'>Gremish Forest</a><br>";
echo "<a href='index.php?mapchange=1&mapname=Port of Suers'>Port of Suers</a><br>";
}
if(isset($_GET['mapchange']))
{
$bypass=1;
$mapname = $_GET['mapname'];
$updateplayer="update players set location='$mapname' where name='$playerinfo3[name]'";
mysql_query($updateplayer) or die("Could not update player");
echo "You have traveled to " . $mapname . ".<br>";
echo "<a href='index.php'>To location</a><br>";
}
if($bypass != 1)
{
echo "<b><big><u>" . $playerinfo3['location'] . "</u></big></b><br>";
echo "<a href='store.php'>Grocery Store</a><br>";
echo "<a href='weaponshop.php'>Weapon Shop</a><br>";
echo "<a href='armorshop.php'>Armor Shop</a><br>";
echo "<a href='inn.php'>The Rusty Doorknob</a><br>";
echo "<a href='spelltrainer.php'>Spell Trainer</a><br>";
/////echo "<a href='battle.php'>Battle in Arena</a><br>"; ///////
/////echo "<a href='index.php?map=1'>Go to Map</a><br>"; ///////
echo "<a href='travelattack1.php'>The West Gate</a><br>";
}
?>
</div>
<div id="logout">
<?php
echo "<br><a href='logout.php'><img src='images/logout.bmp'></a>";
?>
</div>