473,320 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

url parameters with a space in the variable name

Hello,

I am having an issue that is being sent to one of my scripts. A
particular company likes to uses spaces in their url parameters, which
is causing me some issues.

For example:
A url variable might be "custom var" with a value of "1234"
and "custom var2" with a value of "5678"
they are sending this as:

test.php?custom%20var=1234&custom%20var2=5678

I am having trouble accessing this variable.

Things i have tried:
$_GET["uid"]
$_GET["custom uid"]
$_GET["custom%20uid"]
$uid
$_REQUEST["custom uid"]
$_GET['custom uid']

You guys get the idea.

How do i reference these variables?

Thanks.
Mar 18 '08 #1
2 10827
EDIT:
Things i have tried:
$_GET["var"]
$_GET["custom var"]
$_GET["custom%20var"]
$var
$_REQUEST["custom var"]
$_GET['custom var']
Mar 18 '08 #2
I can answer my own question.
$custom_var works. use the underscore instead of space or %20

On Mar 17, 10:54*pm, goobla <goog-...@shadowbrew.comwrote:
EDIT:
Things i have tried:
$_GET["var"]
$_GET["custom var"]
$_GET["custom%20var"]
$var
$_REQUEST["custom var"]
$_GET['custom var']- Hide quoted text -

- Show quoted text -
Mar 18 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: timwap | last post by:
I hava a Java Applet that produces a DTMF tone at a certain time of day. There are 4 parameters to the Applet, they are hour = Hour of triggered event 00~23 min = minute of triggered event 00~59...
11
by: Andrew Thompson | last post by:
I have written a few scripts to parse the URL arguments and either list them or allow access to the value of any parameter by name. <http://www.physci.org/test/003url/index.html>...
5
by: Evan Smith | last post by:
We recently upgraded the box that hosts our main DB2 database to an 8-CPU machine with 8 GB of memory. With all the extra horsepower, we were eager to test performance with intra-parallelism turned...
8
by: Nanda | last post by:
hi, I am trying to generate parameters for the updatecommand at runtime. this.oleDbDeleteCommand1.CommandText=cmdtext; this.oleDbDeleteCommand1.Connection =this.oleDbConnection1;...
11
by: Johnny | last post by:
I'm a rookie at C# and OO so please don't laugh! I have a form (fclsTaxCalculator) that contains a text box (tboxZipCode) containing a zip code. The user can enter a zip code in the text box and...
8
by: Johnny | last post by:
I'm a rookie at C# and OO so please don't laugh! I have a form (fclsTaxCalculator) that contains a text box (tboxZipCode) containing a zip code. The user can enter a zip code in the text box and...
0
by: Adis | last post by:
Hi, My purpose consists on filtering the fields "years" and "clients" of a project WinForm, in a similar way to as I make it without any problems in a previous project ASP.NET. The...
16
by: xz | last post by:
For example, I have a Class Date with internal variable year, month and day. In Java I would write: class Date{ int year; int month; int day; Date(int year, int month, int day) { this.year...
11
by: =?Utf-8?B?U3VqZWV0?= | last post by:
If there are long strings (like 1MB or 2MB) is it more performant to pass those by ref to methods or by value?
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.