note 92414 deleted from reserved.variables.post by danbrown

From: Date: Thu, 23 Jul 2009 13:59:34 +0000
Subject: note 92414 deleted from reserved.variables.post by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-158627@lists.php.net to get a copy of this message
Note Submitter: David ---- I'm having a problem with something that worked in the old version of PHP but isn't working now. the version I'm using is 5.3.0 he is s similar code I'm using <?php $var = $_POST['var']; $edit = $_POST['edit']; $editto = $_POST['editto']; if (!$connect) { die ( "cannot connect" ) } else { print "<form action = 'page1.php' method = 'post'> <input type = 'submit' value = 'Edit Var' name = 'edit'> </form>"; } If ($edit) { print "<form action = 'page1.php' method = 'post'>"; print "Var: <input type = 'text' name = 'var' size = '4'> <input type = 'submit' name = 'editto' value = 'submit'> </form>"; } if ($editto) { $editcheck = check_edit ($connect, $mydb, $table_name, $var); if ($var == $editcheck) { print " you may now edit $var tables "; } else { print " $var is wrong "; } } ?> The problem I'm running into is I get Undefined index on the the variables inside the $_POST. I have found I can use ISSET() for the $edit and $editto, but when I use ISSET() or EMPTY() for the $var it doesn't pass the data typed in.

« previous php.notes (#158627) next »