Monday, September 24, 2007

Websystems 2: PHP Session problem

Problem: I wanted to use sessions for an login so it remembers username and password. i had used the code:

< ? ob_start(); session_start(); ? >


but kept getting errors about already defined header.

Solution: The code was put in the incorrect position. This code needs to be above the html header as I found out after 20mins of pulling my hair out.

0 comments: