I’m passing this URL with Ajax to a PHP file: amazon.com/?ie=UTF8&showViewpo
My problem is with the ‘&’ on the URL.
$_POST['site'] will echo amazon.com/
How can I pass the variable so as to be able to get it whole on my PHP file?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You have to
urlencodeit. That will make it safe to pass in a url.Update
Didn’t read the question correctly.
You have to use
encodeURIComponentto urlencode it in javascript.