954,174 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Call PHP script without changing the Page's current HTML

Here is the problem. I have an HTML page that includes some javascripts. These scripts modify the HTML contents. Some PHP scripts are already in the same file. I want to pass some variables from Javascript to PHP script. If I use get or post, all changes made by javascript are removed and I only have the original HTML elements and whatever that PHP script does.

I want to keep the page as it is now (with javascript modifications), and in the same time use the PHP script to update a MySQL database. How can I do this?

start_game316
Newbie Poster
2 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

You should be able to use jQuery to achieve this. You can find more information on jQuery here: http://jquery.com/

Wraithmanilian
Junior Poster
196 posts since Dec 2009
Reputation Points: 17
Solved Threads: 42
 

Call a php file with query string from your javascript.

window.open("update.php?id=10"...)
rajarajan07
Nearly a Posting Virtuoso
1,447 posts since May 2008
Reputation Points: 167
Solved Threads: 239
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You