Passing Variables with URL using JavaScript in PHP
Posted: Fri Mar 19, 2010 6:09 pm
I want to append / pass two variables and their values along with a URL. I have this JavaScript in my PHP page:
I want to pass $emailID as well but don't seem to put the things together properly.
I tried this method also:
but it didn't work.
I it has to do with the proper use of commas or escape characters. But I am not getting it right.
Code: Select all
window.location = "rmvContacts.php?srNo=" +' . $srNo . ';Code: Select all
$srNo = trim($_REQUEST['srNo']);
$emailID = trim($_REQUEST['email']);Code: Select all
$srNo .= '&email='.$emailID;I it has to do with the proper use of commas or escape characters. But I am not getting it right.