PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I'm writing a MySQL user system as part of administration of a larger script. My problem here is setting a cookie or using sessions to make sure that the user can only view the 'protected' pages once they have logged in.
I know how to set cookies, but I do not know how to read cookies and can't seem to find any instructions on how to.
Note that this isnt a very secure way to check to see if a user is valid as its an easy task to forge a cookie to say 'yes'. You need it to store something that cannot be guessed and that cna be checked against something secret that you hold in a database or file.