problem pulling the variable form a query string
Posted: Mon Oct 23, 2006 7:54 am
JayBird | Please use
I don’t understand why this doesn’t work. I would expect for the number 2 to display but I get nothing. I am new to php and any advice would be greatly appreciated.
JayBird | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I am having a problem pulling the variable from a query string
For example with this url:
http://www.abc.com/go.php?id=2
I would like to pull the id value from the query string and use it for my $id variable within the go.php page. For simplification I tried this:Code: Select all
<html>
<?php
$id = $_get['id'];
echo $id
</html>JayBird | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]