Bug #17706 Updated: Notice: Undefined variable:

From: Date: Tue, 11 Jun 2002 16:25:24 +0000
Subject: Bug #17706 Updated: Notice: Undefined variable:
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-10131@lists.php.net to get a copy of this message
ID: 17706 Updated by: mfischer@php.net Reported By: andygilmour55@hotmail.com -Status: Open +Status: Bogus Bug Type: Variables related Operating System: Windows NT 5.0 build 2195 PHP Version: 4.2.1 New Comment: In PHP 4.2.0, the 'register_globals' setting default changed to be off. See http://www.php.net/release_4_2_0.php for more info. We are sorry about the inconvenience, but this change was a necessary part of our efforts to make PHP scripting more secure and portable. Previous Comments: ------------------------------------------------------------------------ [2002-06-11 12:15:31] andygilmour55@hotmail.com I have this form: <form action="processorder.php" method=post> <table border=0> <tr bgcolor=#cccccc> <td width=150>Item</td> <td width=15>Quantity</td> </tr> <tr> <td>Tyres</td> <td align=center><input type="text" name="tyreqty" size=3 maxlength=3></td> </tr> <tr> <td>Oil</td> <td align=center><input type="text" name="oilqty" size=3 maxlength=3></td> </tr> <tr> <td>Spark Plugs</td> <td align=center><input type="text" name="sparkqty" size=3 maxlength=3></td> </tr> <tr> <td colspan=2 align=center><input type=submit value="Submit Order"></td> </tr> </table> </form> The file processorder.php starts like this: <? echo "<p>Order processed at "; // Start printing order echo date("H:i, jS F"); echo "<br>"; echo "<p>Your order is as follows:"; echo "<br>"; echo $tyreqty." tyres<br>"; echo $oilqty." bottles of oil<br>"; echo $sparkqty." spark plugs<br>"; When I upload it to the server I get this error: Your order is as follows: Notice: Undefined variable: tyreqty in c:\inetpub\wwwroot\processorder.php on line 15 tyres Notice: Undefined variable: oilqty in c:\inetpub\wwwroot\processorder.php on line 16 bottles of oil Notice: Undefined variable: sparkqty in c:\inetpub\wwwroot\processorder.php on line 17 spark plugs What do I have to do to fix this? as I cant get very far if I cant post variables from one page to another. I am aware that this error may already have been posted but with a ISDN line for 50 people here searching the bugs is taking too long. Could you at least supply me a link to the correct bug? Thanks in advance Andy ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17706&edit=1

« previous php.bugs (#10131) next »