Hi All,
I have this code creating a list in a select box.

All works ok, I get my list BUT and a NIG BUT.

When I select an item to delete it only ever deletes from the last
record to the top.

Errrrrr why ?

I think all my code is in the right order but obviously not.

Can anyone throw some light on this.

As always thanks for past and future help

Dave C :-)

----------MY CODE STARTS HERE -----------------------

$deloptions_sql = "select * from $tbn2";
        $delresult = mysql_query($deloptions_sql, $con) or die("error:
        $delrows = mysql_num_rows($delresult); 
        for ($i = 0; $i < $delrows; $i++) {
        $listdelrows = mysql_fetch_array($delresult); 
        $name2 = $listdelrows[name];
        $id2 = $listdelrows[id];
        $del_list .="<option name=\"delprod\"

        $del_sql ="delete from $tbn2 where id = '$id2' and name =
        $del_res = mysql_query($del_sql,$con) or die ("Unable to Delete
        $delproductmsg = "Deleted $name2 from $p_cat_name";
--------------ENDS HERE-------------------------------
Dave Carrera
Website Designer

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to