作者kevin820308 (LoveJLJ)
看板PHP
标题[请益] 新手请教QQ
时间Sun Jun 9 09:15:18 2013
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body
<form action="radio.php" method="post">
<input type="submit" value="删除">
</form>
</body>
</html>
<?php
@$rr[$n]=$_POST['rr'][$n];
mysql_connect这边没问题
mysql_select_db这边没问题
mysql_query("SET NAMES utf8");
mysql_query("DELETE customer where customer_ID='$rr[$n]'");
$result= mysql_query("SELECT customer_ID,customer_Name,customer_addres FROM
customer ");
@$z= "<form action='radio.php' method='post'>"."<table border>\n";
while ($ccc= mysql_fetch_array($result))
{
@$z.="<tr>"."<td>"."<input type='radio' name='rr'
value='".$ccc['customer_ID']."'>"."</td>".
"<td>".@$ccc[customer_ID]."\n"."</td>".
"<td>".@$ccc[customer_Name]."\n"."</td>".
"<td>".@$ccc[customer_addres]."</br>"."</td>"."</tr>";
}
@$z.="</table>"."</form>";
echo $z;
这个是我做的系统管理要删除客户资料......
让每笔表单前有一个单选钮可以选
应该是传递那边有问题,删不了
请问一下哪边要改
不要骂我QQ
感谢
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 114.27.30.57
1F:→ kevin820308:补充一下,按下去删除没有反应 06/09 09:18
2F:→ tkdmaf:@ <== 这东西最好不要乱用。该报错就要让他报。 06/09 09:50
3F:→ tkdmaf:通常我会用@ 是因为要让错误讯息用我自己的写法产生才会用 06/09 09:51
4F:→ tkdmaf:不要让可能的错误视为理所当然的隐藏在程式码内。 06/09 09:52
5F:→ tkdmaf:还有你HTML的写法结构也不对了。 06/09 09:52
6F:→ tkdmaf:</html>就已经是网页结尾,你在後面又继续写…… 06/09 09:53
7F:→ tkdmaf:虽然对浏览器而言,他还是会继续处理,但不是好的结构。 06/09 09:53
8F:→ Darkland:把删除的 query echo 出来看看 06/09 10:36
9F:→ noxhsu:form分开的话,你在哪边丢值给处理的程式? 06/09 10:56
10F:→ noxhsu:如果有ajax或javascript处理,那检查一下送值是否正常 06/09 10:57