Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 225
  • Last Modified:

How to send '&' as a parmeter value?

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
matrix717
Asked:
matrix717
  • 2
  • 2
1 Solution
 
VGRCommented:
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
 
AmeristCommented:
Pass %26 instead of &
0
 
cneelusCommented:
VGR is right.
You URLENCODE the values and in the next page you get the correct values w&c.
0
 
VGRCommented:
I mean, %26 is a good solution, but urlendode/decode is god practice and is more general : it solves a lot of problems
0
 
AmeristCommented:
Agreed.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now