PHP help....

They have: 6 posts

Joined: Jan 2002

I'm a newbie and i'm want to start using php and i'm just wondering how this work.
For example...
http://www.webmaster-forums.com/newthread.php?action

what does the ? part do?

and how do i use it?

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

Everything after the question mark (?) is called the querystring. That is the GET method of passing information to a page. The destination page (newthread.php above) can parse the querystring for the data, and create pairs of variables and values.

A very basic example:

<?php
example
.com/index.php?this=that



echo $this;



Output:
that
?>

Mark Hensler
If there is no answer on Google, then there is no question.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.