Solved

encoding & for passing through the query string

Posted on 2014-07-24
1
192 Views
Last Modified: 2014-07-24
I have a lookup capability that uses the query string to pass the string typed into the web page to a php lookup using ajax.

The "&" is often a part of the string.

Is there a Javascript way to "urlencode" the query string & then "decode" it in php?

Thanks
0
Comment
Question by:Richard Korts
1 Comment
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40218160
encodeURIComponent(querystring)

Open in new window

<?php
$var = urldecode($_GET['var']);

Open in new window

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
JDeveloper 12c for 32 bit 4 34
angularjs controller not found 1 18
Bootstrap 3 and Angular 2 12 23
Different Delete Messages 7 12
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

706 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now