Problems with php need help!!

Website development, web apps, desktop/server apps, mobile apps and any other coding
Locked
Anonymous

Problems with php need help!!

Post by Anonymous »

if (isset($_SESSION['player']))

  {

    $player=$_SESSION['player'];

    $userstats="SELECT * from km_users where playername='$player'";

    $userstats2=mysql_query($userstats) or die("Could not get user stats");

    $userstats3=mysql_fetch_array($userstats2);

    if($userstats3[dead]=='Yes')

    {

      print "You have been slain by $userstats3[killer]
";

      print "<form action='revive.php' method='post'>";

      print "<input type='hidden' name='ID' value='$userstats3[ID]'>";

      print "<input type='submit' name='revives' value='revive'></form>";

    }


    else

    {

      $updaterefresh="update km_users set justattacked=0 where ID='$userstats3[ID]'";

      mysql_query($updaterefresh) or die("Died");

}

else

  {

    print "Sorry, not logged in  please <A href='login.php'>Login</a>
";

 

  }

this is the code that i need help with this is making my page go blank just empty and i cant find wats wrong with it can anyone help?

Archived topic from Iceteks, old topic ID:4821, old post ID:37958
User avatar
Red Squirrel
Posts: 29193
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

Problems with php need help!!

Post by Red Squirrel »

Is print actually a valid php function? I thought it was echo or printf, I always use echo so I may be wrong.

But a blank page indicates any error. To see errors edit your php.ini file to enable error display. I don't know off hand what the parameters are but its in the error reporting section. Need to set "display errors" or similar wording to true. That will pin point the error and which line number its on.

Archived topic from Iceteks, old topic ID:4821, old post ID:37959
Honk if you love Jesus, text if you want to meet Him!
Anonymous

Problems with php need help!!

Post by Anonymous »

ok ill try to find my php.ini file but i dunno wer it is

Archived topic from Iceteks, old topic ID:4821, old post ID:37965
User avatar
Red Squirrel
Posts: 29193
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

Problems with php need help!!

Post by Red Squirrel »

should be in /etc

Archived topic from Iceteks, old topic ID:4821, old post ID:37966
Honk if you love Jesus, text if you want to meet Him!
Anonymous

Problems with php need help!!

Post by Anonymous »

nope dont have a php.ini file

Archived topic from Iceteks, old topic ID:4821, old post ID:37967
User avatar
Red Squirrel
Posts: 29193
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

Problems with php need help!!

Post by Red Squirrel »

do updatedb then locate php.ini, if you don't have it then it means php is not installed properly, or at all.

Actually in your browser when you open the page that is blank, go view source. If you see the php code it means its not even being executed by php which is an indication it may not be installed or configured properly.

Archived topic from Iceteks, old topic ID:4821, old post ID:37968
Honk if you love Jesus, text if you want to meet Him!
Anonymous

Problems with php need help!!

Post by Anonymous »

ffs ther was a little link in top right hand corner that sed php and that is like a cheklist of stuff u want and thats how i veiw error reports with the cpanel how s**t

Archived topic from Iceteks, old topic ID:4821, old post ID:37970
Anonymous

Problems with php need help!!

Post by Anonymous »

also u know with the db do u know how to put a limmit on summin like a maximum number it can be ?????????

Archived topic from Iceteks, old topic ID:4821, old post ID:37971
Locked