Page 1 of 1

Cant see Gold in my store :(

Posted: Wed Dec 08, 2010 12:22 am
by LioN
Hello :) first off all thanks halls for this awesome tut


the problem is the gold i can se it on my index page but not at the store here is the codes

STORE

Code: Select all

<?php
include_once 'connect.php';
session_start();

if (isset($_SESSION['player']))
{
  $player=$_SESSION['player'];
}
else
{
  echo "Not Logged in <br><br> <A href='login.php'>Login</a>";
  exit;
}

 
$counter = 0;

$playerinfo="SELECT * from players where name='$player'";
$playerinfo2=mysql_query($playerinfo) or die("could not get player stats!");
$playerinfo3=mysql_fetch_array($playerinfo2);

echo "<small>";
      print "<center>";
      print "<table border='0' width='70%' cellspacing='20'>";
      print "<tr><td width='25%' valign='top'>";
      print "</td>";
      print "<td valign='top' width='75%'>";
      $invinfo="SELECT * from store where amount > 0";
      $invinfo2=mysql_query($invinfo) or die("could not select anything from the store.");
      print "<table border='1' bordercolor='white' bgcolor='#ffffff'>";
      print "<tr><td>Name<font color='ffffff'>________________</td><td>Stat<font color='ffffff'>______</td><td>Stat Add<font color='ffffff'>______</td><td>Type<font color='ffffff'>______</td><td>Price<font color='ffffff'>______</td></tr>";
      while($invinfo3=mysql_fetch_array($invinfo2))
      {
      $counter = 1;
      print "<tr><td>$invinfo3[name]</td><td>$invinfo3[stats]</td><td>$invinfo3[statadd]</td><td>$invinfo3[type]</td><td>$invinfo3[price]</td><td><A href='buyitem.php?randid=$invinfo3[randid]'>Buy Item</td></tr>";

      }

      print "</table>";
      print "</td></tr></table>";
      print "</center>";
      echo "</small>";

      if ($counter == 0)
      {
            echo "<center>There is nothing in the store at this time.<br>";
            echo "<a href='index.php'>Go Back</center>";
            exit;
      }
  echo "<center><a href='index.php'>NeverMind</center>";
 
  ?>
  
  <div id="gold">
<?php
echo "<b><big><u>Gold</u></big></b><br>";
echo $playerinfo3['gold'];
?>
</div>
CSS

Code: Select all

body {
	background-color: #ffffff;
}
#login {
	position:absolute;
	left:0px;
	top:0px;
	width:800px;
	height:150px;
	z-index:1;
}
#login2 {
	position:absolute;
	left:0px;
	top:200px;
	width:800px;
	height:150px;
	z-index:1;
}
#player {
	position:absolute;
	left:400px;
	top:200px;
	width:450px;
	height:450px;
	z-index:3;
}
#creature {
	position:absolute;
	left:400px;
	top:400px;
	width:450px;
	height:650px;
	z-index:3;
}
#logout {
	position:absolute;
	left:10px;
	top:10px;
	width:150px;
	height:150px;
	z-index:3;
}
#locations {
	position:absolute;
	left:400px;
	top:100px;
	width:450px;
	height:450px;
	z-index:3;
}
#gold {
	position:absolute;
	left:200px;
	top:200px;
	width:150px;
	height:100px;
	z-index:3;
}

Re: Cant see Gold in my store :(

Posted: Wed Dec 08, 2010 1:14 am
by hallsofvallhalla
is the field named gold or money? I cant remember.

Re: Cant see Gold in my store :(

Posted: Tue Oct 18, 2011 6:32 am
by countvoldermort
is this solved yet?