PDA

View Full Version : php, javascript and ajax


awong82
06-24-2010, 06:39 PM
hello, I am currently using php to retrieve information from the mysql database, and in my html file there is a button,what this button does is to display the table data on the page when is click. I first tried using onclick method, if my understanding is right, the onclick event cannot directly call an external php function rite ?

for example button press->call php function-> display data.
and after doing some research on javascript, i understand that we cannot call a php function in javascript, is there a way that i can do above example with ajax? any suggestion, sorry pretty new with php and ajax.

Fou-Lu
06-24-2010, 06:53 PM
PHP is irrelevant to the usage of ajax, it mearly provides the data set for use in ajax just as if you attach to the page directly.
Moving from PHP forum to JS -> Ajax and Design forum.