I have been working on this for a while now.
and i'm trying to save the $orderid to the right $id but i does just not work proberly.
i don't really understand why i doesn't, maybe it's because i'm a newb. 😃
if any one knows what i'm doing wrong, and are willing to kindly guide me on the right track. i will be most happy.
if ($submit) {
$sql = "UPDATE db01 SET orderid='$orderid' WHERE id=$id";
$result = mysql_query($sql);
echo "Updated!<p>";
} elseif ($delete) {
$sql = "DELETE FROM db01 WHERE id=$id";
$result = mysql_query($sql);
echo "Deleted!<p>";
} elseif ($sortorderid) {
$result = mysql_query("select * from db01 ORDER BY orderid", $connection);
while ($myrow = mysql_fetch_array($result)) {
printf("[ Name : %s ]\n", $myrow["name"]);
printf("[ ID : %s ]\n", $myrow["id"]);
printf("[ <a href=\"%s?id=%s&sortorderid=yes\">orderID :</a> <input class='inputord' type=\"Text\" name=\"orderid\" value=\"%s\"> ]\n", $PHP_SELF, $myrow["id"], $myrow["orderid"]);
printf("[ <a href=\"%s?id=%s&delete=yes\">SLET</a> ]<br>\n", $PHP_SELF, $myrow["id"]);
}
printf("<input class='inputbtn' type='Submit' name='submit' value='Gem orderID'></form>");
}
sorry for my bad english