Link to home
Start Free TrialLog in
Avatar of Patrick de Gelder
Patrick de GelderFlag for Netherlands

asked on

Error in php/html code page not loading

Who can explain what is happening:

Using the code like this it works fine,

<?php
if  (isset($_SESSION['id'])) {
echo $_SESSION['uid'];
} else { echo "<form action='signup.php'>
                         <button class=' button button1'>SIGN UP</button>
                        </form>";
                  }

Open in new window


Add tags to first echo out put and it crash error "the page isn't working".

example:

<?php
if  (isset($_SESSION['id'])) {
echo "<tag>$_SESSION['uid'];</tag>"
} else { echo "<form action='signup.php'>
                         <button class=' button button1'>SIGN UP</button>
                        </form>";
                  }

Open in new window


Any help is welcome
Avatar of Marco Gasi
Marco Gasi
Flag of Spain image

Youare mussinga semicolon after the echo statement
echo "<tag>$_SESSION['uid'];</tag>";

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Patrick de Gelder

ASKER

Thanks guys the second entry worked for me :)
THank you