Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't send variables throught a page...

Status
Not open for further replies.

iranor

Programmer
Jun 17, 2004
174
CA
I use Apache 2 and PHP 5.0.5.

I created a small page that I called test.php which contains:


<?
echo $testvar;
phpinfo();
?>

If I type the address test.php?testvar=anything, i see nothing on the page. Same while defining $testvar='something'; on the file....

The phpinfo is working well, but it doesn't wants to manipulate variable... any idea?
 
Ahh thanks. That explains why phpmyadmin was working fine... I was sure it was on, since I never changed it to off..
 
as a side note, the article recomends to keep register_globals off.

in order for test.php?testvar=anything to work, you would need to put in the code

$testvar=$_GET['testvar'];
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top