Problem with posted vars

From: Date: Tue, 06 May 2003 13:08:01 +0000
Subject: Problem with posted vars
Groups: php.general 
Request: Send a blank email to php-general+get-146515@lists.php.net to get a copy of this message
I just moved my scripts to a new server and my scripts looking like example 1 don’t work but if I change them to like Example 2 they work, is there any configuration on the php.ini file that I need to change in order to make example 1 work? Regards, David Example 1 <?php if(!isset($test)){ ?> <form action="<?php echo "$PHP_SELF" ?>" method="post"> <input type="text" name="test"> <input type="submit" name="Submit" value="Submit"> </form> <?php } else{ echo $test; } ?> Example 2 <?php if(!isset($_POST['test'])){ ?> <form action="<?php echo "$PHP_SELF" ?>" method="post"> <input type="text" name="test"> <input type="submit" name="Submit" value="Submit"> </form> <?php } else{ echo $_POST['test']; } ?>

« previous php.general (#146515) next »