ID: 49075 Updated by: [email protected] Reported By: DALamberty at hotmail dot com -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: Windows XP PHP Version: 5.3.0 New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. . Previous Comments: ------------------------------------------------------------------------ [2009-07-27 13:45:03] DALamberty at hotmail dot com 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 this bug report at http://bugs.php.net/?id=49075&edit=1
