quests.php
Code: Select all
<?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;
}
?>
</div>
<?php
$bypass = 0;
$playerinfo="SELECT * from players where name='$player'";
$playerinfo2=mysql_query($playerinfo) or die("could not get player stats!");
$playerinfo3=mysql_fetch_array($playerinfo2);
$id=$playerinfo3['id'];
 $questname = $playerinfo3['name'];
$level = $playerinfo3['level'];
$questinfo="SELECT * from quests where name='$questname'";
$questinfo2=mysql_query($questinfo) or die("could not  select quests!");
$questinfo3=mysql_fetch_array($questinfo2);
print "<center><h3>Quests</h3></center>";
      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%'>";
      $selectquests="SELECT * from quests where pid='$id'";
      $selectquests2=mysql_query($selectquests) or die("could not select quests");
      print "<table border='1' bordercolor='black' bgcolor='#ffffff' >";
      print "<tr><td>Name<font color='ffffff'>_________________</td><td>Experience<font color='ffffff'>_</td><td>Gold<font color='ffffff'>_</td></tr>";
      while($selectquests3=mysql_fetch_array($selectquests2))
	   print "<tr><td>$selectquests3[name]</td><td>$selectquests3[exp]</td><td>$selectquests3[gold]</td></tr>";this is what my quests DB looks like
can someone please help me.
i hope the pictures uploaded right




