明明表格裡欄位沒有值,卻顯示刪除成功

edited 八月 2015 in PHP新手區
<?php session_start(); ?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
include("db.php");

$orderid = $_POST;
$inputname = $_POST;

mysql_query("SET NAMES 'utf8'");

$sql="delete from product where product_id ='$orderid' and custom_name ='$inputname'";

if(mysql_query($sql))
{
echo "刪除成功 ";

}
else
{
echo "刪除失敗 ";
}
?>


orderid、inputname 是text自己輸入的文字
網頁進去隨便亂打資料一直不會進到else

評論

Sign In or Register to comment.