sending data through URL

sending data through URL

am 25.01.2008 00:36:18 von Evan Jou

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

Re: sending data through URL

am 25.01.2008 01:26:57 von luiheidsgoeroe

On Fri, 25 Jan 2008 00:36:18 +0100, Evan Jou 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

Re: sending data through URL

am 26.01.2008 17:58:15 von Mason Barge

"Evan Jou" wrote in message
news:Sh9mj.163711$MJ6.19462@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).

Re: sending data through URL

am 27.01.2008 20:18:51 von junee

On Jan 25, 4:36 am, "Evan Jou" 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.