它顯示17行解析錯誤,我已經徹底檢查,但無法找到error.So如何解決這個error.it是insert_city_query.php在17行解析錯誤,如何解決它
<?php
include('../../Connections/autodealers.php');
//error_reporting(0);
$cityname=$_POST['cityname'];
$cityorder=$_POST['cityorder'];
$status=$_POST['status'];
if($status="Enabled")
$status=1;
else
$status=0;
$query = "INSERT INTO ".$db_prefix."city (cityname,cityorder,status) values
(
'" . addslashes($cityname) . "' ,
'" . addslashes($cityorder) . "' ,
'" . addslashes($status) . " '
WHERE LCASE='strtolower($_REQUEST['cityname'])')";
echo $query;
$result=mysql_query($query);
if(!$result)
{
die ('ERROR: '.mysql_error());
header("Location: " .$base_url. "admin/city_insert.php");//if query fails
}
else
{
header("Location: " .$base_url. "admin/cities.php");//if query suceeds
}
mysql_close($autodealers);
?>
感謝烏拉圭回合的幫助 – lillac
很樂意幫助你。請不要忘記通過點擊左側的複選標記來接受我的答案。 – Rikesh