Tuesday, April 12, 2005

Code PHP!

I have been spending time again coding in PHP. Earlier it was CSS but I am back to working on creating dynamic webpages. I just coded up an error handler.

You see my main pages are going to have urls like this: http://www.domainx.com/PHP/indexpage.php?pagenum=4. The system then goes and looks up the information related to page number four and creates the page. Well what if someone tries to submit:
http://www.domainx.com/PHP/indexpage.php?pagenum=tttttttttttttttttttttttttttttttttttttttt. The first step the indexpage does is to validate the input. Well if the input is invalid I need to provide feedback to the user about their mistake (in the case demonstrated that would likely would not be a mistake but malevolent intent).

I am not quite done as I want to log these errors and am considering if I want to put that into a database table or just flatfile it.

Enough techno-geek talk for now!