sending data through URL

Hi there,

I have a simple question for you experts here. If I key in a URL like,
for example, http://localhost/test.php?name=Evan&password=Jou directly, will
it send the name and password data to the test.php script? Can I use
$_GET['name'] and $_GET['password'] to manipulate the data? Thank you in
advance. :)

Evan Jou
Evan Jou [ Fr, 25 Januar 2008 00:36 ] [ ID #1915646 ]

Re: sending data through URL

On Fri, 25 Jan 2008 00:36:18 +0100, Evan Jou <l.jou [at] att.net> wrote:

> Hi there,
>
> I have a simple question for you experts here. If I key in a URL =

> like,
> for example, http://localhost/test.php?name=3DEvan&password=3DJou dire=
ctly, =

> will
> it send the name and password data to the test.php script? Can I use
> $_GET['name'] and $_GET['password'] to manipulate the data?

Yes, it will be in the $_GET array. It is not recommendable though. URL'=
s =

are often saved in history, can be bookmarked, shared, etc, and you don'=
t =

want usernames/passwords in there. HTTP authentication, or even better, =
=

POSTing the credentials one and just starting a session based on that, =

would be preferable.
-- =

Rik Wasmus
luiheidsgoeroe [ Fr, 25 Januar 2008 01:26 ] [ ID #1916373 ]

Re: sending data through URL

"Evan Jou" <l.jou [at] att.net> wrote in message
news:Sh9mj.163711$MJ6.19462 [at] bgtnsc05-news.ops.worldnet.att.n et...
> Hi there,
>
> I have a simple question for you experts here. If I key in a URL like,
> for example, http://localhost/test.php?name=Evan&password=Jou directly,
> will it send the name and password data to the test.php script? Can I use
> $_GET['name'] and $_GET['password'] to manipulate the data? Thank you in
> advance. :)
>
> Evan Jou

Yes. In fact, if you bookmark the page, that's exactly what your browser
does.

I's a major reason for the plusses and minuses of GET method (most of the
minuses being security related).
Mason Barge [ Sa, 26 Januar 2008 17:58 ] [ ID #1916937 ]

Re: sending data through URL

On Jan 25, 4:36 am, "Evan Jou" <l.... [at] att.net> wrote:
> Hi there,
>
> I have a simple question for you experts here. If I key in a URL like,
> for example,http://localhost/test.php?name=Evan&password=Joudire ctly, will
> it send the name and password data to the test.php script? Can I use
> $_GET['name'] and $_GET['password'] to manipulate the data? Thank you in
> advance. :)
>
> Evan Jou

Evan,
if you dont know, dig with HTML forms and submitting it with POST
method and how to access the submitted form elements in PHP $_POST[]
array.
It is really simple and more secure.
junee [ So, 27 Januar 2008 20:18 ] [ ID #1917345 ]
PHP » comp.lang.php » sending data through URL

Vorheriges Thema: IDE recommendations?
Nächstes Thema: Parsing XHTML fragments