Jump to content

Rephrased Question


diffenc

Recommended Posts

Quick overview: 

 

I have forms writing to two columns in a table and looking to mark correct/mark error the unique entries that are put in.  (The forms writing to the db is complete)

 

By fetching unique strings from a given column ("box1t" below), I want to write back either a "1" or a "0" to another column based on a reviewer's selection ("decision") through a results table as well as a text field to a third column ("reason1") for each unique entry returned.

 

See this form: http://chipdiffendaffer.com/formtesting/translate.php

 

$box1dist = mysql_query("SELECT DISTINCT box1t FROM formtest WHERE task_id = 1");

echo "<form id=\"form1approval\" name=\"form1approval\" method=\"post\" action=\"runapproval.php\" ><table border='1'>
<tr>
<th>Box one result</th>
<th>Approve</th><th>Mark Wrong</th><th>Error Reason</th>
</tr>";
while($row = mysql_fetch_array($box1dist))
  {
  echo "<tr>";
  echo "<td>" . $row['box1t'] . "</td>";
  echo "<td>Correct: <input type=\"checkbox\" value=\"1\" name=\"decision[]\"  \/></td><td>Error: <input type=\"checkbox\" value=\"0\" name=\"decision[]\" \/> </td><td>Error Reason: <input type=\"text\" name=\"reason\" \/> </td>";
  echo "</tr>";
  }
echo "</table><input type=\"submit\" name=\"submit\" value=\"submit\" \/></form>";

?>

 

So after the fetch_array, I need to post back the user selected values from the checkboxes + the text input to the table and match them to the uniques. 

 

I know I need a loop to post back and probably some regular expression, but I'm 5 years removed from programming this stuff.  :) 

 

I haven't gotten anywhere on my runapproval.php script.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.