Php/ajax/sql
I am about to start a project and would like to include AJAX functionality. The question I have is, how do I go about getting variables to AJAX/Java from PHP/SQL. For example, I want to use the yahoo widget/toolset to dynamically call sql queries to populate lists. I havent read into this much, but my initial thoughts were it would take a bunch of steps
1. call a GET from an external PHP script (which will return hidden variables - values to put in the table)
2. after that is returned, load the variables into the java array that is associated with the table
3. update table
Would that be the correct way of going about doing this, or is there something simpler? Would I want to use PHP to do the SQL stuff?
Any insight into a basic workflow of doing dynamic SQL queries using PHP and getting those results back into an AJAX based list would be helpful. I feel like im missing a main/key idea. Thanks in advance.
|