Hello list,

I submitted this problem earlier but got no response so I thought I'd

The code below successfully displays all of the problems from the db. 
Based on what is chosen here, needs to go into another table in the db 
along with a customer tracking id.

for($knt = 0;$row = mysql_fetch_row($res3); $knt++)
        $cat_detail = $row[0];
        echo "<tr><td><input type=\"checkbox\" name=\"prob[]\" value =
        \"$cat_detail\"></td> <td> $cat_detail </td>"
        ."<td> High <input type=\"checkbox\" name=\"level[]\"
        ."<td> Med <input type=\"checkbox\" name=\"level[]\"
        ."<td> Low <input type=\"checkbox\" name=\"level[]\"
        ."<td><center><input type=\"checkbox\"  name=\"yes\"> Yes

When this page is submitted, I can successfully capture $prob[]  - but I
am having no luck in pulling the corresponding $level[] (if one was
checked).  So my form - once submitted - may look like:

Problem one             (no priority picked)
Problem two             High priority
Problem three           Low priority

My $prob[] would be:            My $level[] would be:

$prob[0]: Problem one           $level[0]:      High
$prob[1]: Problem two           $level[1]:      Low
$prob[2]: Problem three

So as you can see my second problem does not correctly correspond to the
correct priority.  The first (or all) element(s) in the level array may
be null.

I have read up on and tried some associative arrays but no luck in
utilizing them within a form; been trying all sorts of testing, books,
web tuts, etc. but still come up with the same problem.  

Also in case anyone were to suggest sessions, my supervisor is adamently
opposed to using them on this site, not sure why, not even sure if that
would make my life easier or not since I've never used them.

Any comments (good, bad, indifferent) here would be most appreciated. 
Any suggestions as to other ways of doing this also appreciated.

Many thanks 


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

Reply via email to