php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10887 Variables from forms being undefined
Submitted: 2001-05-15 15:50 UTC Modified: 2001-06-14 16:57 UTC
From: mikepeterson at videotron dot ca Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.0.5 OS: Windows 2000 Pro
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: mikepeterson at videotron dot ca
New email:
PHP Version: OS:

 

 [2001-05-15 15:50 UTC] mikepeterson at videotron dot ca
When using PHP4.05 my script always told me a variable from a form I had on the page was undefined. Using isset() the script ran without problems, but returned every query with "1" (my best guess is that is TRUE from isset()). I installed PHO4.04 and everything ran perfectly.

Mike Peterson

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-15 15:54 UTC] derick@php.net
Please post a short reproducing script. (short is under 10 lines)
 [2001-05-15 16:01 UTC] mikepeterson at videotron dot ca
Here is an example of a script that returned the error in 4.05, and works in 4.04.

elseif ($delete) {

	// delete a record

    $sql = "DELETE FROM models WHERE model_id=$model_id";	

    $result = mysql_query($sql);

    echo "$sql Record deleted!<p>";
 [2001-05-15 16:23 UTC] derick@php.net
This script shows no isset(), please be a little more descriptive.

Derick
 [2001-05-15 16:27 UTC] mikepeterson at videotron dot ca
This function did not work in PHP4.05:
elseif ($delete) {

	// delete a record

    $sql = "DELETE FROM models WHERE model_id=$model_id";	

    $result = mysql_query($sql);

    echo "$sql Record deleted!<p>";
}

Unless I added isset() like so:

elseif (isset($delete)) {}

But as I added that in other functions that returned a value from mySQL, every value returned would be "1" or TRUE.
 [2001-06-14 16:57 UTC] sniper@php.net
Not bug. Check your setting in php.ini

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon May 05 20:01:29 2025 UTC