Request.QueryString in PHP...?

Hey!

I am a Newbie to PHP…

For Example… we have a page with name “page.asp”
Like in ASP we do Request.QueryString(“show”) and it opens:
pages.asp?show=

How can i do it in PHP?

If you have page.php?show=hello then $_GET[‘show’] will be ‘hello’

markl999!! Thanks…

Anyway i got Detail at:

Thanks…

this one is right:
main file


<?php
$action = $_GET['act'];
  if ($act == 'draw') {
    draw_step1();
}
?>

<a href="page.php?act=draw">Hello</a>

<?php
function draw_step1()
{
?>
<h3>Lazy dog jump over the little brown fox</h3>
<?
}
?>

cya

$HTTP_GET_VARS[‘action’] is the old way of doing it.

$_GET[‘action’] is the proper way now.

ok sorry man…
i hope that the concept was right…
isnt it…
<>>><><><<><>><<><<><><>>><><<>><<>>>>fishing!!!
by the way u learned to write!!!(restaurant)!!!
lol

Is there a way to add a link to this code:



<?php
$action = $_GET['act'];
  if ($act == 'draw') {
    draw_step1();
}
?>


To make like category script, etc. I know you can do the HTML link. Would an array work with that? To have the urls?

Also, if you want the whole Query string, you can use

$_SERVER['QUERY_STRING']

Also, in the example provided by hyperimage, he made a typo in his conditional, it should be

if ($action == 'draw')

:slight_smile: