PHP +JS+数据库联动 请高手 帮忙看下 那个变量错误
<scriptlanguage="JavaScript"><!--functiongo(form){vari=form.bcode.selectedIndexvarb_c...
<script language="JavaScript">
<!--
function go(form) {
var i = form.bcode.selectedIndex
var b_code = form.bcode.options[i].value
window.location = "order_view.php?condition="+b_code+"&cha=1&order_num=<?echo $order_num?>"
}
function new_open(page) {
window.open(page,"goodswindow","toolbar=no,width=300,height=300,status=no,scrollbar=no,resize=no,menubar=no,top=20,left=300");
}
//-->
</script>
<?
if ($cha==1) {
$query="update order_sec set condition='$condition' where cart_user='$order_num'";
$result=mysql_query($query,$connect);
}
<?
$query="select g_num,cart_ea from order_goods where cart_user='$order_num'";
$result=mysql_query($query,$connect);
$row=mysql_fetch_array($result);
$total=mysql_num_rows($result);
for ($i=0;$i<$total;$i++) {
$query1="select gname,dprice,image1,box,order_ea,num from goods where num='$row[0]'";
$result1=mysql_query($query1,$connect);
$row1=mysql_fetch_array($result1);
?>
<select name="bcode" size=1 onchange="go(document.searchcode)">
<option value="1" <?if ($row2[18]=="1") {echo "selected";}?>>未确认</option>
<option value="2" <?if ($row2[18]=="2") {echo "selected";}?>>接受订单</option>
<option value="3" <?if ($row2[18]=="3") {echo "selected";}?>>取消订单</option>
<option value="4" <?if ($row2[18]=="4") {echo "selected";}?>>送货中</option>
<option value="5" <?if ($row2[18]=="5") {echo "selected";}?>>支付完成</option>
<option value="6" <?if ($row2[18]=="6") {echo "selected";}?>>支付取消</option>
</select> 展开
<!--
function go(form) {
var i = form.bcode.selectedIndex
var b_code = form.bcode.options[i].value
window.location = "order_view.php?condition="+b_code+"&cha=1&order_num=<?echo $order_num?>"
}
function new_open(page) {
window.open(page,"goodswindow","toolbar=no,width=300,height=300,status=no,scrollbar=no,resize=no,menubar=no,top=20,left=300");
}
//-->
</script>
<?
if ($cha==1) {
$query="update order_sec set condition='$condition' where cart_user='$order_num'";
$result=mysql_query($query,$connect);
}
<?
$query="select g_num,cart_ea from order_goods where cart_user='$order_num'";
$result=mysql_query($query,$connect);
$row=mysql_fetch_array($result);
$total=mysql_num_rows($result);
for ($i=0;$i<$total;$i++) {
$query1="select gname,dprice,image1,box,order_ea,num from goods where num='$row[0]'";
$result1=mysql_query($query1,$connect);
$row1=mysql_fetch_array($result1);
?>
<select name="bcode" size=1 onchange="go(document.searchcode)">
<option value="1" <?if ($row2[18]=="1") {echo "selected";}?>>未确认</option>
<option value="2" <?if ($row2[18]=="2") {echo "selected";}?>>接受订单</option>
<option value="3" <?if ($row2[18]=="3") {echo "selected";}?>>取消订单</option>
<option value="4" <?if ($row2[18]=="4") {echo "selected";}?>>送货中</option>
<option value="5" <?if ($row2[18]=="5") {echo "selected";}?>>支付完成</option>
<option value="6" <?if ($row2[18]=="6") {echo "selected";}?>>支付取消</option>
</select> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询