Linked Questions
50 votes
10 answers
242k views
Undefined index with $_POST [duplicate]
I am trying to relearn some PHP basics for making a simple login script, however I get an error I have not received before(I made the same script a little over a year ago and never had this error. I ...
49 votes
4 answers
245k views
PHP Undefined Index [duplicate]
This is going to sound really stupid, but I cannot figure out why I am getting this error. I have created a selection box, named "query_age" in my html form: <form method="get" action="user_list....
41 votes
10 answers
118k views
How to avoid 'undefined index' errors? [duplicate]
I am working through some code done by a previous developer. I'm pretty new to PHP so I am wondering if there is any well known pattern or solution to this problem. Basically the original author does ...
9 votes
4 answers
47k views
Undefined index in PHP [duplicate]
Possible Duplicate: PHP: “Notice: Undefined variable” and “Notice: Undefined index” Good day! I am having the following error in my code: <?php if (!$_POST['SUBMIT']){ //ERROR: Undefined ...
6 votes
3 answers
307k views
How to solve Notice: Undefined index: id in C:\xampp\htdocs\invmgt\manufactured_goods\change.php on line 21 [duplicate]
I have a problem with my PHP code saying that "Notice: Undefined index" I am sure its very simple, since I am a beginner i am not getting well what is wrong exactly so please help me. Here's the code ...
5 votes
3 answers
26k views
How to ignore undefined variable error in PHP [duplicate]
I recently setup a new web server and I'm getting undefined variable error. If I use variables without initializing, it gives me an error. The source code did not change. Only the LAMP environment did....
15 votes
3 answers
91k views
Dealing with PHP 8.1 warning for undefined array key [duplicate]
We are upgrading to PHP 8.1. A new feature is that an undefined array key throws a warning. Unfortunately this interferes with the ability to easily use associative arrays such as $_SESSION variables. ...
4 votes
3 answers
112k views
$_POST not working. "Notice: Undefined index: username..." [duplicate]
Possible Duplicate: PHP: “Notice: Undefined variable” and “Notice: Undefined index” So, I am currently learning PHP and was reading on a book about the md5 function for passwords, so I decided to ...
9 votes
1 answer
114k views
Beginner php "Warning: Undefined array key" [duplicate]
So, I'm learning PHP and I keep getting "Warning: Undefined array key" in $GET_["fname"] and $GET_["age"]: <main> <form action="inputs.php" ...
4 votes
5 answers
8k views
PHP Undefined Index [duplicate]
I have this code and it's giving me an undefined error if country is not a variable in the URL. I've never had this problem before so it's obviously something to do with server settings but I'd rather ...
3 votes
4 answers
157k views
PHP - Notice: Undefined index: [duplicate]
Possible Duplicate: PHP: “Notice: Undefined variable” and “Notice: Undefined index” I am trying to do a registration form that registers a user in a database (MySQL). The code is supposed to ...
7 votes
2 answers
12k views
Can I hide PHP Warning: Undefined array key without suppressing all other warnings? [duplicate]
So, looks like they changed the way accessing an array with an unknown key raises a message. <?php if($myArray['foo']) { ... } For 25 years this was simply raising a NOTICE, and people were quite ...
4 votes
3 answers
229k views
An error when I add a variable to a string [duplicate]
I have this line of SQL: $sql = "SELECT ID, ListStID, ListEmail, Title FROM $entry_database WHERE ID = '". $ReqBookID ."'"; $result = mysqli_query($conn, $sql); As you can see, I am selecting an ...
2 votes
4 answers
20k views
Notice: Undefined index: ZZZZZZWTF? [duplicate]
Possible Duplicate: PHP: “Notice: Undefined variable” and “Notice: Undefined index” All of a sudden my php code has come up with : Notice: Undefined index: submit in C:\...
5 votes
3 answers
17k views
Undefined Index for $_POST (noob question!) [duplicate]
Possible Duplicate: PHP: “Notice: Undefined variable” and “Notice: Undefined index” I am just learning PHP and I keep getting an Undefined Index error. The book I'm learning from has an HTML form ...