473,322 Members | 1,241 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,322 software developers and data experts.

Accessing URL parameters

How do I access URL parameters, and ideally as an associative array ?

Many thanks in adance,

Aaron
Dec 31 '07 #1
5 1803
On Mon, 31 Dec 2007 18:24:28 +0100, Aaron Gray <an********@gmail.com>
wrote:
How do I access URL parameters, and ideally as an associative array ?

Many thanks in adance,
Do you want to examine the URL string?
http://www.php.net/parse_url
http://www.php.net/parse_str

Or in the current request, it's offcourse in the $_GET array.
--
Rik Wasmus
Dec 31 '07 #2
"Rik Wasmus" <lu************@hotmail.comwrote in message
news:op***************@metallium.lan...
On Mon, 31 Dec 2007 18:24:28 +0100, Aaron Gray <an********@gmail.com>
wrote:
>How do I access URL parameters, and ideally as an associative array ?

Many thanks in adance,

Do you want to examine the URL string?
http://www.php.net/parse_url
http://www.php.net/parse_str

Or in the current request, it's offcourse in the $_GET array.
parse_url() looke helpful, but I wanted the current pages URL parameters, is
the $_GET ?

Aaron

Dec 31 '07 #3
On Mon, 31 Dec 2007 18:45:07 +0100, Aaron Gray <an********@gmail.com
wrote:
"Rik Wasmus" <lu************@hotmail.comwrote in message
news:op***************@metallium.lan...
>On Mon, 31 Dec 2007 18:24:28 +0100, Aaron Gray <an********@gmail.com>
wrote:
>>How do I access URL parameters, and ideally as an associative array ?

Many thanks in adance,

Do you want to examine the URL string?
http://www.php.net/parse_url
http://www.php.net/parse_str

Or in the current request, it's offcourse in the $_GET array.

parse_url() looke helpful, but I wanted the current pages URL
parameters, is
the $_GET ?
The parameters from the query string indeed.

http://www.example.com/path/to/file.ext?foo=foz&bar=baz

...will result in a $_GET array while running file.ext:
array(
'foo' ='foz',
'bar' ='baz')

If you want other information as well, search the $_SERVER array for your
needs.
--
Rik Wasmus
Dec 31 '07 #4
Aaron Gray wrote:
How do I access URL parameters, and ideally as an associative array ?
$_GET

Cheers,
--
----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

Proudly running Debian Linux with 2.6.22-3-amd64 kernel, KDE 3.5.8, and PHP
5.2.4-2 generating this signature.
Uptime: 19:00:06 up 39 days, 5:15, 4 users, load average: 0.62, 0.51,
0.56

Dec 31 '07 #5
"Rik Wasmus" <lu************@hotmail.comwrote in message
news:op***************@metallium.lan...
On Mon, 31 Dec 2007 18:45:07 +0100, Aaron Gray <an********@gmail.com>
wrote:
"Rik Wasmus" <lu************@hotmail.comwrote in message
news:op***************@metallium.lan...
>On Mon, 31 Dec 2007 18:24:28 +0100, Aaron Gray <an********@gmail.com>
wrote:
>>How do I access URL parameters, and ideally as an associative array ?

Many thanks in adance,

Do you want to examine the URL string?
http://www.php.net/parse_url
http://www.php.net/parse_str

Or in the current request, it's offcourse in the $_GET array.

parse_url() looke helpful, but I wanted the current pages URL parameters,
is
the $_GET ?
The parameters from the query string indeed.

http://www.example.com/path/to/file.ext?foo=foz&bar=baz

...will result in a $_GET array while running file.ext:
array(
'foo' ='foz',
'bar' ='baz')

If you want other information as well, search the $_SERVER array for your
needs.

Thanks,

Aaron
Dec 31 '07 #6

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

Similar topics

4
by: stjulian | last post by:
I have a stored procedure that is supposed to 1. Increment a counter in Table A via a transaction 2. Use this value as the primary key to add in an address to customers Table B (Referenced as a...
1
by: Jay | last post by:
I hope this is the correct place to post this. I'm using a stored procedure to simply look up and return a value from a database. The db key is an integer, everything else is varchar. The stored...
1
by: Mullin Yu | last post by:
hi, i'm using System.Data.OracleClient; but it seems not having Varchar2 and i use Varchar instead. Then when i call a Oracle Procedure update a table with varchar2, i got the following error: ...
8
by: Christopher Weaver | last post by:
I'm having trouble accessing the value of an output parameter of a stored procedure. The SP looks like this: SET TERM ^ ; CREATE PROCEDURE SP_NEW_TASK RETURNS ( "uidTask" INTEGER) AS begin
1
by: Garth Wells | last post by:
Using an example in the Jan 2006 release of the Enterprise Library, I came up with the code shown below to create a DAL method for returning several columns of a single row. I place the output...
11
by: Ryan Krauss | last post by:
I have a set of Python classes that represent elements in a structural model for vibration modeling (sort of like FEA). Some of the parameters of the model are initially unknown and I do some...
4
by: raj_genius | last post by:
I hav two queries, whc are as follows: FIRSTLY: is it possible to access the controls(by name) of a parent form(MDI) from its child forms??if yes then how??plzz provide a coded example in VB if...
10
by: amazon | last post by:
Our vender provided us a web service: 1xyztest.xsd file... ------------------------------------ postEvent PostEventRequest ------------------------------------- authetication authentication...
0
by: thedoctor | last post by:
I have a stored procedure which has a table as one of its "out" parameters. I'm not able to call this procedure from c# .net. please let me know how i can access it. The procedure has been called...
4
by: imranabdulaziz | last post by:
Dear All, I am using asp.net2.0, C#, sql2005 using Visual studio 2005 Let Me explain the scenario I have checkboxlist containg 15 field. Based on no of checked field . I created...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
1
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...
1
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...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.