?
Solved

How to send '&' as a parmeter value?

Posted on 2003-03-15
5
Medium Priority
?
218 Views
Last Modified: 2006-11-17
I need to send values like var1=w&c but I get an error when I try to do this using the get method... What can i do?
0
Comment
Question by:matrix717
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 15

Accepted Solution

by:
VGR earned 500 total points
ID: 8141875
urlencode() the parameters line (full url if you want)before sending, urldecode after receiving

or I guess & could be escaped && or \& (I don't know, never had this problem and I'm too lazy to check the PHP dox ;-)
0
 
LVL 1

Expert Comment

by:Amerist
ID: 8141877
Pass %26 instead of &
0
 
LVL 1

Expert Comment

by:cneelus
ID: 8142405
VGR is right.
You URLENCODE the values and in the next page you get the correct values w&c.
0
 
LVL 15

Expert Comment

by:VGR
ID: 8142455
I mean, %26 is a good solution, but urlendode/decode is god practice and is more general : it solves a lot of problems
0
 
LVL 1

Expert Comment

by:Amerist
ID: 8144592
Agreed.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question