HTML in PHP code

Discussion in 'PHP' started by bmtpep, Apr 10, 2007.

  1. #1
    i got this

    
    <?php   
    if(!isset($_SESSION['username']))  
    {    
    echo("<meta http-equiv='Refresh' content='2; URL=../login.php'/>");
    }
    else
    {     
    echo "The if statement evaluated to true";
    }
    ?>
    
    PHP:
    works great , but obviously i do not want the result "The if statement evaluated to true"

    i need it to display html? is that possible and how would it be done?

    Elaine
     
    bmtpep, Apr 10, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    
    <?php   
    if(!isset($_SESSION['username'])) 
    {   
    echo("<meta http-equiv='Refresh' content='2; URL=../login.php'/>");
    exit();
    }
    ?>
    
    PHP:
    And put all your HTML below.
     
    nico_swd, Apr 10, 2007 IP