RE: [PHP] calling a function in the same page

2006-12-26 Thread Peter Lauri
ST['mysql'])) { //do whatever you want with the //$_POST['mysql'] variable and output the results //the you want to be shown in the div with id resultsdiv } -- Best regards, Peter Lauri -Original Message- From: Aras [mailto:[EMAIL PROTECTED]

RE: [PHP] calling a function in the same page

2006-12-26 Thread Aras
You can not call PHP functions through a href which is used for linking web pages. You need to create a new file or use a switch in your current file for search input, with the function in it. So that you can link to that URL, not the function itself. You can use AJAX as well, to send commands t

Re: [PHP] calling a function in the same page

2006-12-26 Thread Ryan Fielding
Jahangir wrote: I am trying to call a function from "a href" inside the same page. this is the code: echo "More results from Mysite"; // calling the function isearch function isearch($query) {$query=urlencode($query); $request='http://api.search.yahoo.com/WebSearchService/V1/webSearch?appid=Ja

RE: [PHP] calling a function in the same page

2006-12-25 Thread Peter Lauri
Hi, Are you trying to use PHP as a client scripting language? What you are doing cannot be done with plain PHP, you have to invoke JavaScript or similar to make a HTTP request and then parse it. Search Google for "AJAX" and you could get it working using that. Prototype is a easy to use JS libra

Re: [PHP] calling a function in the same page

2006-12-25 Thread Sumeet
Jahangir wrote: I am trying to call a function from "a href" inside the same page. this is the code: echo "More results from Mysite"; // calling the function isearch function isearch($query) {$query=urlencode($query); $request='http://api.search.yahoo.com/WebSearchService/V1/webSearch?appid=Ja