#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    42
    Rep Power
    3

    If else not working


    Hi,

    It is always executing only IF statement. It never goes to ELSE statement. Not sure why?

    Please advise.

    PHP Code:
    <?php
    $_SESSION
    ['numstart'] = mt_rand(2,3);
    $t=$_SESSION['numstart'];

    echo 
    $t ;

    If (
    $t 2)
    {
    echo 
    $t ;
    }

    else

    {
    echo 
    "no" ;
    }

    ?>
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    42
    Rep Power
    3
    never mind.

    I did not use double =

    I am good now.

IMN logo majestic logo threadwatch logo seochat tools logo