Solved

encoding & for passing through the query string

Posted on 2014-07-24
1
196 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

832 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