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?

Member Avatar for rajarajan2017

Call a php file with query string from your javascript.

window.open("update.php?id=10"...)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.