Welcome! Log In Create A New Profile

Advanced

Undefined index

Posted by ngoqoza 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Undefined index
May 02, 2012 06:37PM
Hi Mac
Everything is working fine with my application, but one thing worries me on update and delete, when I click the link update or delete from list, it shows an ERROR in this two pages, the error is: Notice: Undefined index: car_name in C:\Program Files\EasyPHP-5.3.3\www\delete.php on line 27, the following code is for delete page :
Language: PHP
$getid = $_GET[';car_id';]; $car_name = $_GET[';car_name';]; $car_model = $_POST[';car_model';]; $year = $_POST[';year';]; $price = $_POST[';price';]; $submit = $_POST[';delete';];   $query = mysql_query(';SELECT * FROM cars WHERE car_id = "'; . $getid . ';"';); $rows = mysql_fetch_assoc($query);   $carnamedb = $rows[';car_name';]; $car_modeldb = $rows[';car_model';]; $yeardb = $rows[';year';]; $pricedb = $rows[';price';];
avatar
Mac
Re: Undefined index
May 03, 2012 06:46AM
This has been dealt with here and the previous forums many times over. Do a search.
avatar Re: Undefined index
May 03, 2012 09:22AM
I think it might be the name in for form, check the spelling;(eg. <input type="text" name="car_name" value="your_value" >winking smiley. it accrue only when you are referring to the name that does not exist.
avatar
Mac
Re: Undefined index
May 03, 2012 01:11PM
No. A simple search of the forums will resolve it.
Sorry, you do not have permission to post/reply in this forum.