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 have a webserver running on a Win95 machine (ye you read right). I am no php wiz, but i have installed php on the machine. My guestbook is a php script, but it doesnt seem to function like it should. The problem is that i get error messages when viewing the guestbook on my server. I now run my guestbook on a friends server for the time beeing. Below is the guestbook on my server, when i click the admin link i get errors.
Well, it's not really an error that halts execution of the script, basically what it's saying is that the $username variable has no value yet.
Did you write the script? I'm guessing that the admin page has something like...
if ( $username == )
{}
Somewhere in it to check the submitted username and password to see if they are in fact an admin. To fix this either turn down your error reporting or ( preferably ) add something like this...
So anyways... that's making a few assumptions and the code probably doesn't look exactly like that, but the errors tell you what line to look on and you should be able to figure it out from there.
As I clearly state in the post linked to in my signature turning down error reporting is not a solution. All it does is hide the problem so the error is still occuring - you just don't get a notice. Stop using the
method of testing if variables are set because it is the incorrect way of doing it and start using isset() or empty() to test the existance of variables.