note 92414 added to reserved.variables.post
| From: | David at osu1 dot php dot net | Date: | Thu, 23 Jul 2009 13:46:52 +0000 |
| Subject: | note 92414 added to reserved.variables.post | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-158626@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 208.69.120.35
Probable Submitter: 155.8.89.2
----
Manual Page -- http://www.php.net/manual/en/reserved.variables.post.php
Edit -- https://master.php.net/note/edit/92414
Del: integrated -- https://master.php.net/note/delete/92414/integrated
Del: useless -- https://master.php.net/note/delete/92414/useless
Del: bad code -- https://master.php.net/note/delete/92414/bad+code
Del: spam -- https://master.php.net/note/delete/92414/spam
Del: non-english -- https://master.php.net/note/delete/92414/non-english
Del: in docs -- https://master.php.net/note/delete/92414/in+docs
Del: other reasons-- https://master.php.net/note/delete/92414
Reject -- https://master.php.net/note/reject/92414
Search -- https://master.php.net/manage/user-notes.php