Brian,
Ok, I'm ashamed to admit this, since your tutorial is so well laid out, but I'm lost.
I got as far as #7, in the list of instructions. And I went even further by getting my list to be sortable. But I am getting an error when trying to post the results.
Where I'm lost is the use of the ID around #5 after we used "Order_Weight" and are echoing $oweight.
I do have the hidden field adding 1 to the "Order_Weight". That part works fine.
I've wrapped my results table in a form with the action pointing to a new page that includes the code edited (I think) for my application. Here is it just in case I missed something.
<?php
if (isset($_POST["MM_update"])) {
$ordernumber = 1;
$neworder = $_POST['idorder'];
foreach ($neworder as $item){
$updateSQL = sprintf("UPDATE tblAvailable SET Order_Weight='$ordernumber' WHERE id='$item'");
mysql_select_db($database_dbCMS, $dbCMS);
$Result = mysql_query($updateSQL, $dbCMS) or die(mysql_error());
++$ordernumber;
}
header('Location: tblavailable_Results.php');
exit;
}
?>
In my case, the db is called dbCMS and the table is called tblAvailable.
I did create a column name "Order_Weight" and I included it in my insert.php pages Insert behavior.
Should I have an update behavior on my Results page for this?
The current errors are
"Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in..."
"Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in..."
Thanks again so much,
TroyD