execute php script but stay on page

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sarris
Forum Contributor
Posts: 137
Joined: Mon Dec 04, 2006 2:44 pm

execute php script but stay on page

Post 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?
Begby
Forum Regular
Posts: 575
Joined: Wed Dec 13, 2006 10:28 am

Post by Begby »

Ajax
sarris
Forum Contributor
Posts: 137
Joined: Mon Dec 04, 2006 2:44 pm

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

What's the point of it normally?
sarris
Forum Contributor
Posts: 137
Joined: Mon Dec 04, 2006 2:44 pm

Post 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?
Xoligy
Forum Commoner
Posts: 53
Joined: Sun Mar 04, 2007 5:35 am

Post by Xoligy »

lookup SAJAX, it's a library that makes using AJAX simple enough.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

and jQuery!

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

(did I mention jQuery?)
Xoligy
Forum Commoner
Posts: 53
Joined: Sun Mar 04, 2007 5:35 am

Post by Xoligy »

Meh, overkill IMO.
Post Reply