Page 1 of 1

execute php script but stay on page

Posted: Tue Mar 13, 2007 11:46 am
by sarris
Hi there.
I have a question that might seem easy to answer.
I want to call a php script from an html page, but i dont want the browser to direct to the php page. I just need the php script to execute some actions conserning the database.
What the best way to do this?

Posted: Tue Mar 13, 2007 12:22 pm
by Begby
Ajax

Posted: Tue Mar 13, 2007 12:32 pm
by sarris
ok...will do.
question on that. If i set the url that i pass to open() function like this

Code: Select all

url = "myphp.php?id="+id
whats the point of the GET or POST parameter?
thnx

Posted: Tue Mar 13, 2007 11:15 pm
by feyd
What's the point of it normally?

Posted: Wed Mar 14, 2007 8:32 am
by sarris
i dont really know in that case and couldnt really find a description of the difference of the headers in any documentation or tutorial arround the XMLhttpObject...Would anyone mind telling me?

Posted: Wed Mar 14, 2007 10:43 am
by Xoligy
lookup SAJAX, it's a library that makes using AJAX simple enough.

Posted: Wed Mar 14, 2007 2:42 pm
by Kieran Huggins
and jQuery!

.... don't forget about jQuery!!!!!

(did I mention jQuery?)

Posted: Wed Mar 14, 2007 4:37 pm
by Xoligy
Meh, overkill IMO.