+ 1
[newbie Q] php session
Hi I wrote this code <?php session_start(); $_SESSION['nume'] = 'ok'; $x = "sesiunea is " if (isset($_SESSION['nume'])){ echo $x + $_SESSION['nume']; } else { echo 'sesiunea is not ok'; } ?> When I want to run it on browser it says : Parse error: syntax error, unexpected 'if' (T_IF) in D:\xampp\htdocs\index.php on line 5 Someone can help me please?
1 Réponse
+ 1
you are forgotten a semicolon in line before the if statement