i cant update my database for some reason.🙁
is there an error in my sql or is it an error in my function. please help, i'm a beginner.
function update_item($id) {
global $db_host, $db_user, $db_pass, $db_name, $table, $artist, $title, $label, $comments, $year, $format, $price, $quantity, $url;
echo "updated.";
if(!empty($GET['a']) &
!empty($GET['t']) &
!empty($GET['l']) &
!empty($GET['c']) &
!empty($GET['y']) &
!empty($GET['f']) &
!empty($GET['p']) &
!empty($GET['q']) &
!empty($_GET['u']) ) {
$artist = !empty($GET['a']);
$title = !empty($GET['t']);
$label = !empty($GET['l']);
$comments = !empty($GET['c']);
$year = !empty($GET['y']);
$format = !empty($GET['f']);
$price = !empty($GET['p']);
$quantity = !empty($GET['q']);
$url = !empty($_GET['u']);
if (!empty($GET['id'])) {
$id = $GET['id'];
$db = mysql_connect($db_host, $db_user, $db_pass);
mysql_select_db($db_name,$db);
mysql_query(" UPDATE vinyl
SET artist = '$artist',
title = '$title',
label = '$label',
comments = '$comments',
year = '$year',
format = '$format',
price = '$price',
quantity = '$quantity',
url = '$url'
WHERE id LIKE 95
") or die ("error in sql update.");
mysql_close($db);
}
}
}