PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
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:
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.
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]
Maybe id it' s empty or the PHP parser doesn' t parse it (it' s an unknown index for it). Open your php.ini file and at the section \Error handling and logging enable to be displayed all (error_reporting = E_ALL)