can anyone help me with this error i am not able to get this. Notice: Undefined index: id in C:\xampp\htdocs\project\Book_store\ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

can anyone help me with this error i am not able to get this. Notice: Undefined index: id in C:\xampp\htdocs\project\Book_store\

Notice: Undefined index: id in C:\xampp\htdocs\project\Book_store\admin\process_del_book.php on line 4 <?php require('includes/config.php'); $query="delete from book where b_id =".$_GET['id']; mysqli_query($conn,$query) or die("can't Execute..."); header("location:all_book.php.php"); ?>

12th Apr 2018, 9:08 AM
Abdul Azeez Naseer Khan
Abdul Azeez Naseer Khan - avatar
6 Answers
+ 9
Check if the $_GET['id'] is set if(isset($_GET['id'])) { $query="delete from book where b_id =".$_GET['id']; } Undefined index means that you are trying to access data in array that doesn't exist.
12th Apr 2018, 12:38 PM
Toni Isotalo
Toni Isotalo - avatar
+ 2
You can post your own question about your problem. Inamdar Inamdar
15th Apr 2018, 4:30 AM
Toni Isotalo
Toni Isotalo - avatar
+ 1
When you call the $_GET super global variable it retrieves variables from the url of the page (like anything after the ? located after the page name.) You need to make sure that there is something that says id=someValue. If not it will not work
12th Apr 2018, 11:15 AM
Ariela
Ariela - avatar
0
Sir please help me
15th Apr 2018, 4:26 AM
Inamdar Inamdar
Inamdar Inamdar - avatar
0
css and JavaScript please help
15th Apr 2018, 4:27 AM
Inamdar Inamdar
Inamdar Inamdar - avatar
0
sir CSS animation
15th Apr 2018, 4:32 AM
Inamdar Inamdar
Inamdar Inamdar - avatar