Nathan Lane wrote:
At the top level, where my XHTML is, Is there a reason for me to use PHP? I don't need any content management systems, and I require JavaScript to be enabled (or I might switch a bunch of it to server side JavaScript). Does this paint a clearer picture of my question?
I always use php at the top level on my pages for session validation. When I write web apps my users need to log in. So I use php at the top level to see if they are logged in and allowed on that page. I also make certain option available based off of their login credentials.
I often use php at the top level to create the forms. In a database I'll have a list of key values like "type of project". I'll create a table in the database to store the different type projects and then use that as a foreign key in the projects table. Then when I create the form I select the values from the table and write them out to the form as part of the select statement(or check boxes). That way I only need to add the new value to the table in the database and it shows up on all my forms.
Kyle _______________________________________________ UPHPU mailing list [email protected] http://uphpu.org/mailman/listinfo/uphpu IRC: #uphpu on irc.freenode.net
