Im been playing with PHP for a while, whilst not actually doing it for a crust. I have now stumbled upon jquery and have found it really easy to get what I want out of it. Combining all this together I have strung together a webapp but with no formal training I could possibly be going about it all wrong as far as structure goes.
What I have done is create a main page and insert the content of that page within a div. All the ajax for entire site is included at the loading of the main page as 'frontend.js'. The ajax posts and calls go to one backend file 'backend.php' which has all the sql, validation etc.
My file structure is something like
index.php
backend.php
frontend.js
login.php
about.php
t&c.php
.........etc
I have CSS folders and JS folders as well but I guess you get the point.
What is the recommended method here? Add the required JS on each page? Have multiple backend scripts for each page also?
Or is this just a case of what ever works works?
Thx