+ 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?

9th Jun 2018, 11:19 AM
Andyyy
1 Respuesta
+ 1
you are forgotten a semicolon in line before the if statement
9th Jun 2018, 12:13 PM
MO ELomari
MO ELomari - avatar