From:             DALamberty at hotmail dot com
Operating system: Windows XP
PHP version:      5.3.0
PHP Bug Type:     Unknown/Other Function
Bug description:  $_POST

Description:
------------
I am trying to pass data from a text field thru $_POST to a varialbe
while the text field is blank because it hasn't been filled in I get a
undefined index warning from the names assigned to the text fields.
I have tryed assigning a starting value to the text fields, but I still
get the undefined index. I have tryed the ISSET() and EMPTY()
on the variable thru $_POST but it doesn't allow the fields to be
populated when its time to populate.

Reproduce code:
---------------
$var = $_POST['var']; $edit = isset($_POST['edit']); $editto =
isset($_POST['editto']);
print "<form action = 'form.php' method = 'post'>
<input type = 'submit' value = 'Edit' name= 'edit'></form>";
if ($edit) {
print "<form action = 'form.php' method = 'post'>
SSN: <input type = 'text' name = 'var' size = '10'>
<input type = 'submit' value = 'submit' name = 'editto'>";
}
if ($editto) {
print "$var"
}

Actual result:
--------------
before information is input:

Notice: undefined index: var in C:\wamp\www\folder\form.php on line ##

after text is entered into text field the notice goes away.

I have tryed ISSET and EMPTY on the varialbe that is suppose to recieve
the text but it then doesn't transfer any text.

-- 
Edit bug report at http://bugs.php.net/?id=49075&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=49075&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=49075&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=49075&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=49075&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=49075&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=49075&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=49075&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=49075&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=49075&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=49075&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=49075&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=49075&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=49075&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=49075&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=49075&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=49075&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=49075&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=49075&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=49075&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=49075&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=49075&r=mysqlcfg

Reply via email to