php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17706 Notice: Undefined variable:
Submitted: 2002-06-11 12:15 UTC Modified: 2002-06-11 12:25 UTC
From: andygilmour55 at hotmail dot com Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.2.1 OS: Windows NT 5.0 build 2195
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: andygilmour55 at hotmail dot com
New email:
PHP Version: OS:

 

 [2002-06-11 12:15 UTC] andygilmour55 at hotmail dot 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 can`t get very far if I can`t 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-11 12:25 UTC] mfischer@php.net
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Oct 04 08:01:28 2024 UTC