After struggling with Ajax for a few years, I hunkered down and finally got into it. Not as difficult as it first seemed.
I do have one question regarding opening and closing the MySQL database.
Main Program
openMysqlDbFunction;
do some assorted stuff
Do the Ajax thing
do some db stuff
close database
PHP called by Ajax
do some db stuff
This will give me an error because the database is not opened.
PHP called by Ajax
openMysqlDbFunction;
do some db stuff
1) Why do I have to open it again even though it's open in the main calling program?
2) Because I'm opening it again in the Ajax PHP code, does that close the DB in the main program?
3) Suppose the Ajax routine is called several times in the Main Program. Am I not doing things cleanly? Should I close the DB in the Ajax/PHP code?
Thanks for the help.