Bug #17706: Notice: Undefined variable:

From: Date: Tue, 11 Jun 2002 16:15:31 +0000
Subject: Bug #17706: Notice: Undefined variable:
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-10129@lists.php.net to get a copy of this message
From: andygilmour55@hotmail.com Operating system: Windows NT 5.0 build 2195 PHP version: 4.2.1 PHP Bug Type: Variables related Bug description: Notice: Undefined variable: 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 bug report at http://bugs.php.net/?id=17706&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=17706&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=17706&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=17706&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=17706&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=17706&r=support Expected behavior: http://bugs.php.net/fix.php?id=17706&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=17706&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=17706&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=17706&r=globals

« previous php.bugs (#10129) next »