I have a script i currently use to create a photo gallery. here:
At the top of my code i’ve started it with session start(); and works fine. but when i want to enter this in the php code section:
// User not logged in, redirect to login page
// Display logout link
i upload, test and i get this page:
The error i get is a:
Warning: Cannot modify header information – headers already sent by (output started at /home/o/openc/www/talent/home.php:5) in /home/o/openc/www/talent/photogallery/home.gallery.php on line 179
i check line 179 which is this from the code i entered above:
The thing that confuses me is it seems to be trying to redo the session it already created after i click on one of the images and thus i get this error?
can somone help me out? how do you insert a session variable in the middle of the script that ultimatley visualy creates a new page from the same php script on the same page?
Basicly i want to create login after somone clicks on the image and then accesses that area.
- The topic ‘PHP Sessions’ is closed to new replies.