|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-05-16 17:07 UTC] derick@php.net
[2001-05-16 17:36 UTC] lyric@php.net
[2001-05-16 17:39 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 18:00:01 2025 UTC |
Ok, I ran this script on my Apache server with the new PHP 4.0.5 installed and it did not work... <? if($id="view"){ echo "You are in view mode"; } else{ echo "You are not in view mode"; ?> <br> <form action="?id=view" method="post"> <input type="submit" value="Change to View Mode"> </form> <? } ?> When you first view the page, it says "You are not in view mode" and has a submit button that says "Change to View Mode". If you click to button it will give $id the value of "view", so when it reloads the page, it will display "You are in view mode". This script works fine on my server with the earlier version of PHP, but not with 4.0.5. The new version 4.0.5 returns an error the first time it loads an says that $id hasnt been defined. I dont know if they changed it on the new version because they thought it was a bug of the old versions(that didnt return errors for undeclared variables), but if thats the case, they certainly disabled simple scripts like this one that made things a hell of a lot easier for us programmers. Thats why I'm using the old version of PHP, and not PHP 4.0.5 on my Apache server.