Page 1 of 1

Help me from this ANNOYING problems

Posted: Sat Jul 16, 2011 6:15 pm
by RafliArema
1. SESSION PROBLEM
When I'm trying to put

Code: Select all

<?php
include_once "connect.php";

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

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="icon" type="image/vnd.microsoft.icon" href="images/favicon.ico">	
<link rel="stylesheet" href="gpack/inside.css" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Xevant - Browser Game</title>
</head>

<body>
<?php
include_once "connect.php";

if (isset($_SESSION['player']))
{
  $player=$_SESSION['player'];
}
else
{
  echo "Not Logged in <br><br> <A href='login.php'>Login</a>";
  exit;
}
?>
<table width="829" height="64" border="0">
  <tr>
    <td width="823"><? include_once "header.html" ?></td>
  </tr>
</table>
<table width="836" height="424" border="0">
  <tr>
    <td width="234" height="420"><table width="200" height="420" border="0">
      <tr>
        <td height="75"><table width="228" border="1">
          <tr>
            <td width="218" height="118"><div class="Standard">
              <ul>
            <li class="Standard"><a href="parse1.php">Peninjauan Desa</a></li>
            <li><a href="parse2.php">Pusat Desa</a></li>
            <li><a href="map.php">Peta</a></li>
            <li><a href="rank.php">Statistik</a></li>
            <li><a href="report.php">Laporan</a></li>
            <li><a href="message.php">Pesan</a></li>
            <hr align="left"/>
            <li><a href="plus.php">Premiums</a></li>
            <li><a href="help">Help</a></li>
            <li><a href="profile.php">Profile</a></li>
            <li><a href="clan">Clan</a></li>
            <li><a href="friend.php">NAPs</a></li>
            <li><a href="logout.php">Logout</a></li>
            </ul>
            </div></td>
          </tr>
        </table></td>
      </tr>
      <tr>
      <td height="142"> </td>
      </tr>
    </table></td>
    <td style="border-left: 2px dotted blue; padding: 5px;" width="486"></td>
    <td style="border-left: 2px dotted blue; padding: 5px;" width="102"> </td>
  </tr>
</table>
<p> </p>
</body>
</html>
It always wrong....
I don't know what is the problem, but everytime I login and redirecting to parse1.php
It always appear the LOGIN message.....
This is confusing me.... or maybe the <?php
include_once "connect.php";

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

Cannot inserted into [head]???

2. TRIBES and TROOPS
The next problems is about tribes and troops.
For example, the tribes is Romans, Gauls, and teutons
then the troops is Teutonic Knight....
How do I make TEUTONIC KNIGHT can only trained by teutons.... etc
I already look for halls video, but the video doesn't fully help me....
I know the video was great, but not for the source code.... I hope halls provide the code for download....


thanks

Re: Help me from this ANNOYING problems

Posted: Sat Jul 16, 2011 7:29 pm
by 62896dude
Are you posting the same problem like 3 or 4 times? If so, people will be less inclined tp help you if you are spamming the boards. If not, please put [solved] next to solved topics

Re: Help me from this ANNOYING problems

Posted: Sat Jul 16, 2011 7:37 pm
by Nexus
I honestly I see this as a person who really didn't learn much from hall's videos. Just watch the videos THEN code and then all will be much clearer.

Re: Help me from this ANNOYING problems

Posted: Mon Jul 18, 2011 10:07 pm
by hallsofvallhalla
place a field in the troops called tribe, then enter the tribe there.

Then do a simple

Code: Select all

if($troop['tribe'] == $trainer['tribe']
{

}
or however you have the code