hi i wanna pick up ajax.. i came across a simple tutorial on http://www.w3schools.com/php/php_ajax_database.asp. i realise the php file was called in javascript.. but wat if the php file has several functions, how do we call the function in the php file. tks
I don't know AJAX, but I don't understand why you want to call a function in a php file. Instead make more php files with one function in each. But as I said, I don't know ajax, it is possible there is a way to do what you want.
You could add a query string variable/value pair to the URL which calls the PHP script, then use the value of the resulting $_GET element control which function is called.
tks guys for the reply.. anymore ideas out there?
Actually, you don't need any other ideas. NogDog has the correct answer - and Piranha's answer will work perfectly well too.