\n"); $res1 = query($connection, $insert); $sel1 = "select id from item where pid='$pid' and ord='$ord'"; $res2 = query($connection, $sel1); $data = fetch_object($res2, 0); $id = $data->id; } $select = "select * from item where id=$id"; $delete = "delete from item where id=$id"; $result = query($connection, $select); $item = fetch_object($result, 0); // stuff the db query into an html comment print("\n"); print("