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 may offend some people here, but i thnk using php to do simple form validation (is X field not empty) is silly. why wait for another page to load when you can just use a pretty simple bit a JavaScript? It's faster, and easier on the server.
Also considering you don't want people with JavaScript turned off. The problem with controlled environments is that they are rarely controlled, even if you develop for intranets. Trust me, I have worked on them.
You can't assume for a moment everyone will be using the same browser. Using PHP for form validation is a rather responsible task, and one which isn't done enough.
You cannot trust that the user has java script turned on. He/she might be using some unknown obscure beta relase of some new Linux browser that doesn't even support java script.
Agreed, you can't always rely on JavaScript being there, you should always vaildate the data at the server (in addition to frontend checking) or you end up with a lot of crap data in your database.
what about using templates within a CMS framework? wouldn't this be a good way to prevent people from making nasty pages?
user: i want to make a webpage for my department
admin: ok, here are the templates you have to choose from. you can change the content, but you can not modify the layout or the color scheme.
user: ok. but i want to make this line bigger, and red and flashing.
admin: sorry, that is not available in these templates.
The bigger problem with PHP template engines is they cause more work for web designers and developers since you have to learn "their" tags. Why not just use industry standard tags for god sakes? There are also speed concerns that template engines add because all of the code has to be doubly parsed and executed. Also, (not that I have tested it) but I using Dreamweaver and those tools would definitely not be compatable with these add-hoc templating engines.