I have a php page, first.php and I want to open the page with passing some arguments from a javascript function. Could you please help me, thanks.
function() {
As the previous answers state, you could easily use window.location
to open a PHP page; however, you should always remember to escape your variables when using them in a URL, using the encodeURIComponent()
JavaScript function:
window.location = "http://localhost/first.php?q=" + encodeURIComponent(checkB) + "&p=" + encodeURIComponent(tableName);