【发布时间】:2013-02-04 14:36:14
【问题描述】:
我有一个框,里面有几个基于表 ID 的条目:
<ul id="sortable">
<?php do { ?> <li class="ui-state-default" id="<?php echo $row_Recordset1['entry']; ?>">
<?php echo $row_Recordset1['PartNo']; ?></li>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
我已经定义了可排序的 jQuery:
$(function() {
$( "#sortable" ).sortable();
});
var newp = $("#sortable" ).sortable('toArray');
而我想要做的只是将这个数组传递到数据库记录过程中的下一页:
window.location.href = "quotations_build_itemsorder2.php?newp[]="+newp;
我不断得到一个空数组。
帮助....请!
【问题讨论】:
-
Please, don't use
mysql_*functions in new code。它们不再维护and are officially deprecated。看到red box?改为了解prepared statements,并使用PDO 或MySQLi - this article 将帮助您决定哪个。如果你选择 PDO,here is a good tutorial.
标签: php jquery jquery-ui-sortable