Yeah that email idea could prove to be quite a handful with sites bigger then a postage stamp...
Thing is, I don't know enough php to know what I can do here so I'm all ears to you guys. I can then go and do some script-chopping and viola - a nice lil tutorial for you guys to feel proud of
BTW this needs removing
http://codenewbie.com/tutorials/2274.html
EDIT: We have to think modular here, guys. I dont' want to have to tell people to manually edit every single page in thier website. I want to be able to put the logging scripts in the error docs themselves. I could easily do this if I knew how to call the last page from the current page.
I have a good article for working with flat file databases, I just need a way of picking up that little piece of information of what page was last clicked. I think there is a hyperlink cheat that will push the browser back one page, regardless of location. Something like "../" I think. Will this work?
Damn guys I really don't know what I'm trying to do here!
EDIT2: I've just realised something. What if the browser is pointing to this broken link with the attribute target=_blank ?? This will mean that trying to find the last page won't work if it is in a seperate browser window.
Will this work:
When a link is clicked, an entry is made to the errorLog file. If the error page does show, then the entry stays there. If the correct page shows then the most top/recent entry gets deleted.
???
Can this be done with a variable? When the user clicks, $ErrorEntry = "Date, current file name, target file". When the right page loads, this variable is cleared $ErrorEntry. If the error file shows then the variable $ErrorEntry is sent tot he flat file database.
This variable method...id it works with 404 code then it will work with any of the other codes.