PHP, AJAX, and global variables
Posted: Wed Mar 03, 2010 9:30 pm
Before I start my first Ajax coding effort, I thought I'd confirm my understanding of PHP global variables and sessions. It seems to me , from what I've read, that when I execute a php script from Javascript, that I need to provide that php script with everything it needs as it will not have access to already established global variable or session values, nor will it be able to use the database connection established by the php script that rendered the page from which the javascript will run. Said more simply, I'll have to have every php script that I run from Javascript:
1. start a session
2. establish a database connection
3. logon to the database
4. provide SQL every individual column value that it needs for both select and/or update.
Do I have this right?
1. start a session
2. establish a database connection
3. logon to the database
4. provide SQL every individual column value that it needs for both select and/or update.
Do I have this right?