Page 1 of 4

Browser MMO Video #16

Posted: Sat Oct 31, 2009 5:31 pm
by hallsofvallhalla

Re: Video#16

Posted: Sat Oct 31, 2009 6:14 pm
by countvoldermort
Is it just my computer or is the pic sorter bad

Re: Video#16

Posted: Sat Oct 31, 2009 6:52 pm
by hallsofvallhalla
pic sorter?

Re: Video#16

Posted: Sat Oct 31, 2009 7:20 pm
by countvoldermort
let me say it again:
Is it my computer or is the pic bad?

Re: Video#16

Posted: Sat Oct 31, 2009 7:21 pm
by countvoldermort
no worry, its better now! so never mind, it was a bad pic the first time but its ok now.

Re: Video#16

Posted: Sat Oct 31, 2009 8:34 pm
by skacke
When's the leveling tut coming out? :)

Re: Video#16

Posted: Sat Oct 31, 2009 8:45 pm
by hallsofvallhalla
next!

Re: Video#16

Posted: Sat Oct 31, 2009 9:50 pm
by countvoldermort
Is this the correct code?

Code: Select all

<?php
include_once 'connect.php';
  session_start();
    include_once 'logo.php';
    ?>
      <link href="style.css" rel="stylesheet" type="text/css" />
<?php
if (isset($_SESSION['player']))
{
  $player=$_SESSION['player'];
}
else
{
  echo "Not Logged in <br><br> <A href='login.php'>Login</a>";
  exit;
}
$playerinfo="SELECT * from players where name='$player'";
$playerinfo2=mysql_query($playerinfo) or die("could not get player stats!");
$playerinfo3=mysql_fetch_array($playerinfo2);
$pllocation=$playerinfo3['location'];
$maxhp = $playerinfor3['maxhp'];
include_once 'statpanel.php';
?>
</div>
<div id="table">
 <?php
if (isset($_POST['price'];
{
  $price = $_POST ['price'];
   $exitgreet = $_POST ['exitgreet'];
if ($playerinfo3['gold'] > $price);
{
 echo "You do not have enough Gold to stay at this Inn!";
  echo "<center><a href='index.php'>Go back</a></center>";
  exit;
}
echo "<center>" . $exitgreet . "<br /><br />";
echo "<A href='index.php'>Leave Inn</a></center>";

$updateplayer="update players set hpoints='maxhp',gold=gold-'$price' where name='$player'";
  mysql_query($updateplayer) or die("Could not update player");
exit;
}
else
{
 $inninfo="SELECT * from locations where name='$pllocation' AND type='inn'";
$inninfo2=mysql_query($inninfo) or die("Could not get player stats!");
$inninfo3=mysql_fetch_array($inninfo2);

 echo "<center>" .inninfo3['greeting'] ."<br />";
 echo "The current price of this Inn is" . $inninfo3['price'] ." Gold<br /><br />";
 echo "Would you like to stay?<br /></center>";
 }
  ?>
  <center>
  <form method="post" action="inn.php">
  <input type="submit" value="Yes"><br /><br />
  <input type="hidden" name="price" value="<?php echo $inninfo3['price'];?>" />
   <input type="hidden" name="exitgreet" value"<?php echo $innindo3['exitgreet'];?>" />
   </form>
   <form action="index.php">
  <input type="submit" value="No">
  </form></center>
  </div>
  

  

is that right??

Re: Video#16

Posted: Mon Nov 02, 2009 3:02 am
by alexrules01
Thanks for the next vid Halls, this is just what I wanted :D

Re: Video#16

Posted: Tue Nov 10, 2009 8:58 am
by Alexx
Nice job on all the videos as always - keep up the great work :)