Jump to content

davinci29

New Members
  • Posts

    2
  • Joined

  • Last visited

davinci29's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. There were lots of forums which has the same issue but none of them has the solution that I need, below is my code, <td colspan="2"><form id="form1" name="form1" method="post" action="" onsubmit="return validateDBLoad()"> What it does after I fill up the form is it validates the datas that were entered thru validateDBLoad javascript. Then after I submit the data to db, when I tried to refresh the page its giving me this pop up "Confirm Form Resubmission".
  2. I have my table below which is the result from my query, Status |Tasks|Owner|Details ------------------------------- OnGoing|test |test |2016-09-01 test a OnGoing|test |test |2016-09-02 test b OnGoing|test |test |2016-09-03 test c What I want to happen is that if the Tasks is like `test` and Status is like `OnGoing` it will show up in a single row under Details column below, Status |Tasks|Owner|Details ------------------------------- OnGoing|test |test |2016-09-01 test a 2016-09-02 test b 2016-09-03 test c My current query is, $sql="SELECT date, status, task, owner, details FROM tracker WHERE date BETWEEN '" . $date . "' AND '" . $date1 . "' ORDER BY date, status"; And here is the code for my table, echo "<table width='auto' cellpadding='1px' cellspacing='0px' border=1 align='center'> <tr> <th align='center' style='border:dotted 1px;' bgcolor='#66CC00'><font color='#FFFFFF'><strong>Status</strong></font></th> <th align='center' style='border:dotted 1px;' bgcolor='#66CC00'><font color='#FFFFFF'><strong>Tasks</strong></font></th> <th align='center' style='border:dotted 1px;' bgcolor='#66CC00'><font color='#FFFFFF'><strong>Owner/s</strong></font></th> <th align='center' style='border:dotted 1px;' bgcolor='#66CC00'><font color='#FFFFFF'><strong>Details</strong></font></th> </tr>"; while($result = mysql_fetch_array($myData)) { { $status = $result['status']; $status = str_replace("\r\n", "<br>", $status); $status = str_replace("\r", "<br>", $status); $status = str_replace("\n", "<br>", $status); $task = $result['task']; $task = str_replace("\r\n", "<br>", $task); $task = str_replace("\r", "<br>", $task); $task = str_replace("\n", "<br>", $task); $owner = $result['owner']; $owner = str_replace("\r\n", "<br>", $owner); $owner = str_replace("\r", "<br>", $owner); $owner = str_replace("\n", "<br>", $owner); $date = $result['date']; $date = str_replace("\r\n", "<br>", $date); $date = str_replace("\r", "<br>", $date); $date = str_replace("\n", "<br>", $date); $details = $result['details']; $details = str_replace("\r\n", "<br>", $details); $details = str_replace("\r", "<br>", $details); $details = str_replace("\n", "<br>", $details); echo "<form action='get_test.php' method='post'>"; echo"<tr>"; echo "<td align='center'>" . $result['status'] . "<input type=hidden name=status value=" . $result['status'] . " </td>"; echo "<td align='center'>" . $result['task'] . "<input type=hidden name=task value=" . $result['task'] . " </td>"; echo "<td align='center'>" . $result['owner'] . "<input type=hidden name=owner value=" . $result['owner'] . " </td>"; echo "<td align='left' width='auto'> " . $date . "<input type=hidden name=date value=" . htmlspecialchars($date) . " /><br> " . $details . "<input type=hidden name=details value=" . htmlspecialchars($details) . " /> </td>"; "</tr>"; echo "</form>"; } } echo "</table>"; Please help as I dont know what to do anymore.
×
×
  • 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.