[Solved] PHP - Problem with receiving ******?id=4
Moderator: General Moderators
-
uuplunkeruu
- Forum Newbie
- Posts: 2
- Joined: Tue Mar 23, 2004 6:43 pm
- Location: Miami
[Solved] PHP - Problem with receiving ******?id=4
I have two files on my system the first 1 is test.htm and it contains:
<a href="test1.php?id=4">Link</a>
The second file contains (test1.php)
<?php
if( $id == 4) { print "It works"; }
else { print "No work"; }
?>
For some reason it never prints "It works" I always get "No work". I am running on a Debian 2.2.24, Apache 2.0.48, PHP 4.3.4.... I don't know if it is a Apache Problem or a PHP problem. I have tried seeing if it was apache problem by doing request_headers() and headers_sent() and response_headers() they all work fine.
Any help would be greatly appreciated.
Thank You...
<a href="test1.php?id=4">Link</a>
The second file contains (test1.php)
<?php
if( $id == 4) { print "It works"; }
else { print "No work"; }
?>
For some reason it never prints "It works" I always get "No work". I am running on a Debian 2.2.24, Apache 2.0.48, PHP 4.3.4.... I don't know if it is a Apache Problem or a PHP problem. I have tried seeing if it was apache problem by doing request_headers() and headers_sent() and response_headers() they all work fine.
Any help would be greatly appreciated.
Thank You...
Code: Select all
<?php
if(!empty($_GET['id']) && $_GET['id'] == 4) {
echo 'It works';
} else {
echo 'No work';
}
?>-
uuplunkeruu
- Forum Newbie
- Posts: 2
- Joined: Tue Mar 23, 2004 6:43 pm
- Location: Miami
Thanks for the help
Thanks for the help that worked. I have only been working with PHP for about 2 days now and I have to move a site from 1 host to another and different vers etc....
Thank You.
Thank You.
-
magicrobotmonkey
- Forum Regular
- Posts: 888
- Joined: Sun Mar 21, 2004 1:09 pm
- Location: Cambridge, MA
-
magicrobotmonkey
- Forum Regular
- Posts: 888
- Joined: Sun Mar 21, 2004 1:09 pm
- Location: Cambridge, MA
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK