Browser MMO Video #16

Location of the Videos
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Browser MMO Video #16

Post by hallsofvallhalla »

countvoldermort
Posts: 165
Joined: Tue Oct 13, 2009 4:22 pm

Re: Video#16

Post by countvoldermort »

Is it just my computer or is the pic sorter bad
Im dumb;)
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Video#16

Post by hallsofvallhalla »

pic sorter?
countvoldermort
Posts: 165
Joined: Tue Oct 13, 2009 4:22 pm

Re: Video#16

Post by countvoldermort »

let me say it again:
Is it my computer or is the pic bad?
Im dumb;)
countvoldermort
Posts: 165
Joined: Tue Oct 13, 2009 4:22 pm

Re: Video#16

Post by countvoldermort »

no worry, its better now! so never mind, it was a bad pic the first time but its ok now.
Im dumb;)
skacke
Posts: 38
Joined: Mon Oct 12, 2009 10:08 pm

Re: Video#16

Post by skacke »

When's the leveling tut coming out? :)
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Video#16

Post by hallsofvallhalla »

next!
countvoldermort
Posts: 165
Joined: Tue Oct 13, 2009 4:22 pm

Re: Video#16

Post 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??
Im dumb;)
alexrules01
Posts: 175
Joined: Sun Oct 11, 2009 9:33 am

Re: Video#16

Post by alexrules01 »

Thanks for the next vid Halls, this is just what I wanted :D
Alexx
Posts: 23
Joined: Sun Jul 26, 2009 3:39 am

Re: Video#16

Post by Alexx »

Nice job on all the videos as always - keep up the great work :)
Post Reply

Return to “Older Browser MMO Videos”