Jump to content

simple if statement


CBaZ

Recommended Posts

if ($_SESSION["permission"] <= "2") 
{
  echo 'yes it is less than or equal to 2';

} 
else 
{
   echo 'no it is greater than 2';
}

 

I am not sure what your trying to accomplish here...

($_SESSION["username"]; Enjoy The Tunes!)

 

This is not an echo or a variable set statement. It does nothing. Also you need to make sure that you close any if / else statements otherwise you will get fatal error: unexpected end in the code

Link to comment
https://forums.phpfreaks.com/topic/62955-simple-if-statement/#findComment-313471
Share on other sites

ok here is what i am trying to do

<?

if (isset($_SESSION["logged"])) {

 

&&(isset($_SESSION["permission"] <= "2")

{

?>

(<? echo $_SESSION["username"];?>:

Enjoy The Tunes!)<br>

<?

  }

} else {

?>

 

 

 

echo "<a href='register.php' onclick='NewWindow(this.href,'client_add','450','480','no');return false' class='field' onMouseOver='window.status='Register with the MaloriaN (PoP-UP)'; return true' onMouseOut='window.status='...:: M a l o r i a N -¤- E n t e r t a i n m e n t -¤- . N e t ::...'; return true' target='blank'>..Register..</a> For Future Benefits. </B></center>";

<? } ?>

 

i know this isnt at all correct but everytime i break it down to fix it i run into more issues and can't even use the username display at all.

 

Link to comment
https://forums.phpfreaks.com/topic/62955-simple-if-statement/#findComment-313499
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.