- 2

In example code is not work

code is not run

28th Jan 2017, 2:11 PM
ajit kumar burnwal
ajit kumar burnwal - avatar
3 Réponses
+ 1
Which code?
29th Jan 2017, 7:16 AM
Animesh
Animesh - avatar
0
Share the code here !
28th Jan 2017, 2:14 PM
Arpan Lunawat
Arpan Lunawat - avatar
0
i guess the code is : <?php $value = "John"; <b>setcookie</b>("user", $value, time() + (86400 * 30), '/'); if(isset($_COOKIE['user'])) { echo "Value is: ".$_COOKIE['user']; } //Outputs "Value is: John" ?> the code playground show this message : Parse error: syntax error, unexpected '<', expecting end of file in ..\Playground\ PHP Parse error: syntax error, unexpected '<', expecting end of file in ..\Playground\ and if i try to fix it by removing the <b> tag from the php code i have this message : Warning: Cannot modify header information - headers already sent by (output started at ..\Playground\:1) in ..\Playground\ PHP Warning: Cannot modify header information - headers already sent by (output started at ..\Playground\:1) in ..\Playground\ good coding :)
7th Feb 2017, 12:05 PM
Abdelghani GUILIGHE
Abdelghani GUILIGHE - avatar