Jump to content

Barand

Moderators
  • Posts

    24,613
  • Joined

  • Last visited

  • Days Won

    834

Everything posted by Barand

  1. One way to test it would be to work backwards from the JSON. Decode the JSON string and recreate a table from its data so you can visually compare the results with a display or print of the original. It would be too tricky to recreate something as bad as the original so go for something simpler, say If you want to test it in CLI mode, then, unless you want the extra fun of drawing grids on the screen, you could go for a simple column display, such as
  2. As far as I can see, they appear consistent within each block. But there is no way of knowing - if the times were reversed, who could know which was which? The best processor for this table is a document shredder.
  3. The proof of the pudding is in the eating... (Line 72 applies the labels to the student data) $html = file_get_contents('c:/inetpub/wwwroot/test/doc1355/rohan.html'); // the table html $ranges= [[ 'start' => [ 'r'=>5, 'c'=>0 ], // DATES 'end' => [ 'r'=>5, 'c'=>21 ], 'labels'=> ['date'] ], [ 'start' => [ 'r'=>6, 'c'=>0 ], 'end' => [ 'r'=>11, 'c'=>21 ], 'labels'=> [ 'student_id', 'report_time', 'leaving-time', 'office', 'other', 'first_race'] ], [ 'start' => [ 'r'=>13, 'c'=>0 ], 'end' => [ 'r'=>18, 'c'=>21 ], 'labels'=> [ 'student_id', 'report_time', 'other', 'office', 'leaving-time', 'first_race'] ], [ 'start' => [ 'r'=>19, 'c'=>0 ], 'end' => [ 'r'=>24, 'c'=>21 ], 'labels'=> [ 'student_id', 'report_time', 'other', 'office', 'leaving-time', 'first_race'] ], [ 'start' => [ 'r'=>25, 'c'=>0 ], 'end' => [ 'r'=>30, 'c'=>21 ], 'labels'=> [ 'student_id', 'report_time', 'other', 'office', 'leaving-time', 'first_race'] ]]; foreach ($ranges as $range) { $results[] = getColumns($html, $range); } $results_by_date = getResultsByDate($results); function getResultsByDate($results) { $res = []; foreach ($results[0] as $kc => $date) { $res[$kc] = [ 'date' => $date['date'], 'students' => [] ]; } for ($i=1; $i<=4; $i++) { foreach ( $results[$i] as $kc => $sdata) { #if (ctype_digit($sdata[0]) || $sdata[0]=='N/A') { if (!empty($sdata['student_id']) && $sdata['student_id'] != '&nbsp;') { $res[$kc]['students'][] = $sdata; } } } // remove dates with no students $res = array_filter($res, function($v) { return !empty($v['students']); }); return $res; } function getColumns(&$html, $range) { $rows = []; $kr = 0; $p1 = 0; // find first row in out range for ($r=0; $r<=$range['start']['r']; $r++) { $p1 = strpos($html, '<tr', $p1); ++$p1; } $p1--; for ($kr=$range['start']['r']; $kr<=$range['end']['r']; $kr++) { $rows[$kr] = getCells($html, $range, $p1); $p1 = strpos($html, '<tr', $p1+1); } $cols = []; for ($kc=$range['start']['c']; $kc<=$range['end']['c']; $kc++) { $cols[] = array_combine($range['labels'], array_column($rows, $kc)); // ASSIGN THE LABELS TO THE DATA } return $cols; } function getCells(&$html, $range, $p1) { $cells = []; for ($kc=$range['start']['c']; $kc<=$range['end']['c']; $kc++) { $p1 = strpos($html, '<td', $p1+1); $p1 = strpos($html, '>', $p1+1); $p2 = strpos($html, '<td', $p1); $cells[$kc] = trim(strip_tags(substr($html, $p1+1, $p2-$p1-1))); } return $cells; } echo '<pre>' . print_r($results_by_date, 1) . '</pre>'; Gives Array ( [0] => Array ( [date] => May29Tue [students] => Array ( [0] => Array ( [student_id] => N/A [report_time] => [leaving-time] => [office] => [other] => [first_race] => ) ) ) [1] => Array ( [date] => May30Wed [students] => Array ( [0] => Array ( [student_id] => AAVL [report_time] => 06:00 [leaving-time] => 14:00 [office] => [other] => [first_race] => ) ) ) [2] => Array ( [date] => May31Thu [students] => Array ( [0] => Array ( [student_id] => 8751 [report_time] => 03:55 [leaving-time] => 04:55 [office] => WFH [other] => COMP AVL [first_race] => 08:00 ) [1] => Array ( [student_id] => 8752 [report_time] => 08:35 [other] => COMP AVL [office] => WFH [leaving-time] => 11:55 [first_race] => 12:25 ) ) ) ... etc ... or if you want the json output echo json_encode($results_by_date); [{"date":"May29Tue","students":[{"student_id":"N\/A","report_time":" ","leaving-time":" ","office":" ","other":" ","first_race":" "}]},{"date":"May30Wed","students":[{"student_id":"AAVL","report_time":"06:00","leaving-time":"14:00","office":" ","other":" ","first_race":" "}]},{"date":"May31Thu","students":[{"student_id":"8751","report_time":"03:55","leaving-time":"04:55","office":"WFH","other":"COMP AVL","first_race":"08:00"},{"student_id":"8752","report_time":"08:35","other":"COMP AVL","office":"WFH","leaving-time":"11:55","first_race":"12:25"}]},{"date":"Jun01Fri","students":[{"student_id":"8462","report_time":"04:30","leaving-time":"05:30","office":"WFH","other":"COMP NOT AVL","first_race":"07:10"},{"student_id":"8465","report_time":"07:45","other":"COMP NOT AVL","office":"WFH","leaving-time":"09:20","first_race":"09:50"}]},{"date":"Jun02Sat","students":[{"student_id":"CBSE","report_time":"02:00","leaving-time":"10:00","office":" ","other":" ","first_race":" "}]},{"date":"Jun03Sun","students":[{"student_id":"N\/A","report_time":" ","leaving-time":" ","office":" ","other":" ","first_race":" "}]},{"date":"Jun04Mon","students":[{"student_id":"N\/A","report_time":" ","leaving-time":" ","office":" ","other":" ","first_race":" "}]},{"date":"Jun05Tue","students":[{"student_id":"N\/A","report_time":" ","leaving-time":" ","office":" ","other":" ","first_race":" "}]},{"date":"Jun06Wed","students":[{"student_id":"N\/A","report_time":" ","leaving-time":" ","office":" ","other":" ","first_race":" "}]},{"date":"Jun07Thu","students":[{"student_id":"N\/A","report_time":" ","leaving-time":" ","office":" ","other":" ","first_race":" "}]},{"date":"Jun08Fri","students":[{"student_id":"8113","report_time":"05:05","leaving-time":"06:05","office":"WFH","other":"ZRH","first_race":"07:50"},{"student_id":"8114","report_time":"08:25","other":"ZRH","office":"WFH","leaving-time":"10:10","first_race":" "},{"student_id":"8277","report_time":"11:05","other":"WFH","office":"MAD","leaving-time":"13:40","first_race":"14:10"}]},{"date":"Jun09Sat","students":[{"student_id":"8274","report_time":"04:00","leaving-time":"05:00","office":"MAD","other":"WFH","first_race":"07:25"},{"student_id":"8221","report_time":"08:10","other":"WFH","office":"VLC","leaving-time":"10:30","first_race":" "},{"student_id":"8222","report_time":"11:05","other":"VLC","office":"WFH","leaving-time":"14:00","first_race":"14:30"}]},{"date":"Jun10Sun","students":[{"student_id":"N\/A","report_time":" ","leaving-time":" ","office":" ","other":" ","first_race":" "}]},{"date":"Jun11Mon","students":[{"student_id":"N\/A","report_time":" ","leaving-time":" ","office":" ","other":" ","first_race":" "}]},{"date":"Jun12Tue","students":[{"student_id":"AAVL","report_time":"05:15","leaving-time":"13:15","office":" ","other":" ","first_race":" "}]},{"date":"Jun13Wed","students":[{"student_id":"8973","report_time":"04:05","leaving-time":"05:05","office":"WFH","other":"SOF","first_race":"08:05"},{"student_id":"8974","report_time":"08:50","other":"SOF","office":"WFH","leaving-time":"12:10","first_race":"12:40"}]},{"date":"Jun14Thu","students":[{"student_id":"ADTY","report_time":"09:30","leaving-time":"16:30","office":" ","other":" ","first_race":" "}]},{"date":"Jun15Fri","students":[{"student_id":"8233","report_time":"12:25","leaving-time":"13:25","office":"WFH","other":"SSP","first_race":"15:40"},{"student_id":"8237","report_time":"16:10","other":"SSP","office":"WFH","leaving-time":"18:25","first_race":"18:55"}]},{"date":"Jun16Sat","students":[{"student_id":"N\/A","report_time":" ","leaving-time":" ","office":" ","other":" ","first_race":" "}]},{"date":"Jun17Sun","students":[{"student_id":"N\/A","report_time":" ","leaving-time":" ","office":" ","other":" ","first_race":" "}]},{"date":"Jun18Mon","students":[{"student_id":"807","report_time":"11:35","leaving-time":"12:35","office":"WFH","other":"OMV","first_race":"14:10"},{"student_id":"808","report_time":"14:35","other":"OMV","office":"WFH","leaving-time":"16:15","first_race":" "},{"student_id":"837","report_time":"16:50","other":"WFH","office":"BFS","leaving-time":"18:25","first_race":" "},{"student_id":"840","report_time":"18:55","other":"BFS","office":"WFH","leaving-time":"20:25","first_race":"20:55"}]},{"date":"Jun19Tue","students":[{"student_id":"8551","report_time":"10:50","leaving-time":"11:50","office":"WFH","other":"MJV","first_race":"14:30"},{"student_id":"8552","report_time":"15:00","other":" ","office":"WFH","leaving-time":"17:40","first_race":" "},{"student_id":"8187","report_time":"18:55","other":"WFH","office":"LIN","leaving-time":"20:50","first_race":"21:20"}]}]
  4. The label arrays define the data pattern for each block
  5. I'd assumed they'd given someone 15 minutes html training and told them to construct the table of student data manually.
  6. The only way I can see of doing it is to supply the labels to be applied when you define the data blocks For example [ 'start' => [ 'r'=>6, 'c'=>0 ], 'end' => [ 'r'=>11, 'c'=>21 ], 'labels'=> [ 'student_id', 'report_time', 'leaving-time', 'office', 'comp_avl', 'first_race'] ] Thats strange. It's one of things I pointed out right at the start - I said there was no consistency in the data.
  7. The point is you can't apply the same set of field names because the data appears to be randomly ordered for each block of students. Where they the same text (like "COMP AVL") sometimes it's the third item, sometimes it's the fifth. (Why do you think you got the Award Certificate?) See example in my previous post.
  8. [{"student_id":"AAVL","report_time":"06:00","leaving_time":"14:00", ... ^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^ How are you getting those field names into the data? There is no consistent pattern in the data blocks and no labels. For example [date] => May31Thu [students] => Array ( [0] => Array ( [0] => 8751 Student [1] => 03:55 2 times [2] => 04:55 [3] => WFH 2 texts [4] => COMP AVL [5] => 08:00 1 time ) [1] => Array ( [0] => 8752 Student [1] => 08:35 1 time [2] => COMP AVL 2 texts [3] => WFH [4] => 11:55 2 times [5] => 12:25 ) )
  9. Test if it's a student nnumber or "N/A"? if (ctype_digit($sdata[0]) || $sdata[0]=='N/A') { $res[$kc]['students'][] = $sdata; } If you want those with "AAVL", "CBSE" etc as well, then if (!empty($sdata[0]) && $sdata[0] != '&nbsp;') { $res[$kc]['students'][] = $sdata; }
  10. Try this $html = file_get_contents('rohan.html'); // the table html $ranges= [[ 'start' => [ 'r'=>5, 'c'=>0 ], // DATES 'end' => [ 'r'=>5, 'c'=>21 ] ], [ 'start' => [ 'r'=>6, 'c'=>0 ], // specify block of rows/cols 'end' => [ 'r'=>11, 'c'=>21 ] // ( top left is r=0 c=0 ) ], [ 'start' => [ 'r'=>13, 'c'=>0 ], 'end' => [ 'r'=>18, 'c'=>21 ] ], [ 'start' => [ 'r'=>19, 'c'=>0 ], 'end' => [ 'r'=>24, 'c'=>21 ] ], [ 'start' => [ 'r'=>25, 'c'=>0 ], 'end' => [ 'r'=>30, 'c'=>21 ] ]]; foreach ($ranges as $range) { $results[] = getColumns($html, $range); } $results_by_date = getResultsByDate($results); function getResultsByDate($results) { $res = []; foreach ($results[0] as $kc => $date) { $res[$kc] = [ 'date' => $date[0], 'students' => [] ]; } for ($i=1; $i<=4; $i++) { foreach ( $results[$i] as $kc => $sdata) { if (ctype_digit($sdata[0])) { // does it lok like a student number? $res[$kc]['students'][] = $sdata; } } } // remove dates with no students $res = array_filter($res, function($v) { return !empty($v['students']); }); return $res; } function getColumns(&$html, $range) { $rows = []; $kr = 0; $p1 = 0; // find first row in out range for ($r=0; $r<=$range['start']['r']; $r++) { $p1 = strpos($html, '<tr', $p1); ++$p1; } $p1--; for ($kr=$range['start']['r']; $kr<=$range['end']['r']; $kr++) { $rows[$kr] = getCells($html, $range, $p1); $p1 = strpos($html, '<tr', $p1+1); } $cols = []; for ($kc=$range['start']['c']; $kc<=$range['end']['c']; $kc++) { $cols[] = array_column($rows, $kc); } return $cols; } function getCells(&$html, $range, $p1) { $cells = []; for ($kc=$range['start']['c']; $kc<=$range['end']['c']; $kc++) { $p1 = strpos($html, '<td', $p1+1); $p1 = strpos($html, '>', $p1+1); $p2 = strpos($html, '<td', $p1); $cells[$kc] = trim(strip_tags(substr($html, $p1+1, $p2-$p1-1))); } return $cells; } echo '<pre>' . print_r($results_by_date, 1) . '</pre>'; gives (21 students) Array ( [2] => Array ( [date] => May31Thu [students] => Array ( [0] => Array ( [0] => 8751 [1] => 03:55 [2] => 04:55 [3] => WFH [4] => COMP AVL [5] => 08:00 ) [1] => Array ( [0] => 8752 [1] => 08:35 [2] => COMP AVL [3] => WFH [4] => 11:55 [5] => 12:25 ) ) ) [3] => Array ( [date] => Jun01Fri [students] => Array ( [0] => Array ( [0] => 8462 [1] => 04:30 [2] => 05:30 [3] => WFH [4] => COMP NOT AVL [5] => 07:10 ) [1] => Array ( [0] => 8465 [1] => 07:45 [2] => COMP NOT AVL [3] => WFH [4] => 09:20 [5] => 09:50 ) ) ) [10] => Array ( [date] => Jun08Fri [students] => Array ( [0] => Array ( [0] => 8113 [1] => 05:05 [2] => 06:05 [3] => WFH [4] => ZRH [5] => 07:50 ) [1] => Array ( [0] => 8114 [1] => 08:25 [2] => ZRH [3] => WFH [4] => 10:10 [5] => ) [2] => Array ( [0] => 8277 [1] => 11:05 [2] => WFH [3] => MAD [4] => 13:40 [5] => 14:10 ) ) ) [11] => Array ( [date] => Jun09Sat [students] => Array ( [0] => Array ( [0] => 8274 [1] => 04:00 [2] => 05:00 [3] => MAD [4] => WFH [5] => 07:25 ) [1] => Array ( [0] => 8221 [1] => 08:10 [2] => WFH [3] => VLC [4] => 10:30 [5] => ) [2] => Array ( [0] => 8222 [1] => 11:05 [2] => VLC [3] => WFH [4] => 14:00 [5] => 14:30 ) ) ) [15] => Array ( [date] => Jun13Wed [students] => Array ( [0] => Array ( [0] => 8973 [1] => 04:05 [2] => 05:05 [3] => WFH [4] => SOF [5] => 08:05 ) [1] => Array ( [0] => 8974 [1] => 08:50 [2] => SOF [3] => WFH [4] => 12:10 [5] => 12:40 ) ) ) [17] => Array ( [date] => Jun15Fri [students] => Array ( [0] => Array ( [0] => 8233 [1] => 12:25 [2] => 13:25 [3] => WFH [4] => SSP [5] => 15:40 ) [1] => Array ( [0] => 8237 [1] => 16:10 [2] => SSP [3] => WFH [4] => 18:25 [5] => 18:55 ) ) ) [20] => Array ( [date] => Jun18Mon [students] => Array ( [0] => Array ( [0] => 807 [1] => 11:35 [2] => 12:35 [3] => WFH [4] => OMV [5] => 14:10 ) [1] => Array ( [0] => 808 [1] => 14:35 [2] => OMV [3] => WFH [4] => 16:15 [5] => ) [2] => Array ( [0] => 837 [1] => 16:50 [2] => WFH [3] => BFS [4] => 18:25 [5] => ) [3] => Array ( [0] => 840 [1] => 18:55 [2] => BFS [3] => WFH [4] => 20:25 [5] => 20:55 ) ) ) [21] => Array ( [date] => Jun19Tue [students] => Array ( [0] => Array ( [0] => 8551 [1] => 10:50 [2] => 11:50 [3] => WFH [4] => MJV [5] => 14:30 ) [1] => Array ( [0] => 8552 [1] => 15:00 [2] => [3] => WFH [4] => 17:40 [5] => ) [2] => Array ( [0] => 8187 [1] => 18:55 [2] => WFH [3] => LIN [4] => 20:50 [5] => 21:20 ) ) ) )
  11. You will find it easier to process the results and remove the unwanted (empty) sub-arrays. Also, only the first range contains the dates, so you you might want to grab the dates separately from the studunts' data then they can be applied to all ranges. These ranges grab the dates in $results[0] and the student data in $results[1] - [4] $ranges= [[ 'start' => [ 'r'=>5, 'c'=>0 ], // DATES 'end' => [ 'r'=>5, 'c'=>21 ] ], [ 'start' => [ 'r'=>6, 'c'=>0 ], // specify block of rows/cols 'end' => [ 'r'=>11, 'c'=>21 ] // ( top left is r=0 c=0 ) ], [ 'start' => [ 'r'=>13, 'c'=>0 ], 'end' => [ 'r'=>18, 'c'=>21 ] ], [ 'start' => [ 'r'=>19, 'c'=>0 ], 'end' => [ 'r'=>24, 'c'=>21 ] ], [ 'start' => [ 'r'=>25, 'c'=>0 ], 'end' => [ 'r'=>30, 'c'=>21 ] ]];
  12. You could extend the range of rows. But there is no way with that data to now know for sure where a new student starts in each column. If you know a way, build it into the process. The alternative is to repeat the process for each of the blocks... $ranges= [[ 'start' => [ 'r'=>5, 'c'=>0 ], // specify block of rows/cols 'end' => [ 'r'=>11, 'c'=>21 ] // ( top left is r=0 c=0 ) ], [ 'start' => [ 'r'=>13, 'c'=>0 ], 'end' => [ 'r'=>18, 'c'=>21 ] ], [ 'start' => [ 'r'=>19, 'c'=>0 ], 'end' => [ 'r'=>24, 'c'=>21 ] ], [ 'start' => [ 'r'=>25, 'c'=>0 ], 'end' => [ 'r'=>30, 'c'=>21 ] ]]; foreach ($ranges as $range) { $results[] = getColumns($html, $range); } echo '<pre>' . print_r($results, 1) . '</pre>';
  13. It deserves recognition
  14. OK. Forget the "simple" classes (or any other) exist and go back to basics. This allows you specify a block of cells (EG row 5, col 0 to row 12, col 21) and produces an array of the contents of each column... Array ( [0] => Array ( [0] => May29Tue [1] => N/A [2] => [3] => [4] => [5] => [6] => ) [1] => Array ( [0] => May30Wed [1] => AAVL [2] => 06:00 [3] => 14:00 [4] => [5] => [6] => ) [2] => Array ( [0] => May31Thu [1] => 8751 [2] => 03:55 [3] => 04:55 [4] => WFH [5] => COMP AVL [6] => 08:00 ) [3] => Array ( [0] => Jun01Fri [1] => 8462 [2] => 04:30 [3] => 05:30 [4] => WFH [5] => COMP NOT AVL [6] => 07:10 ) [4] => Array ( [0] => Jun02Sat [1] => CBSE [2] => 02:00 [3] => 10:00 [4] => [5] => [6] => ) [5] => Array ( [0] => Jun03Sun [1] => N/A [2] => [3] => [4] => [5] => [6] => ) [6] => Array ( [0] => Jun04Mon [1] => N/A [2] => [3] => [4] => [5] => [6] => ) [7] => Array ( [0] => Jun05Tue [1] => N/A [2] => [3] => [4] => [5] => [6] => ) [8] => Array ( [0] => Jun06Wed [1] => N/A [2] => [3] => [4] => [5] => [6] => ) [9] => Array ( [0] => Jun07Thu [1] => N/A [2] => [3] => [4] => [5] => [6] => ) [10] => Array ( [0] => Jun08Fri [1] => 8113 [2] => 05:05 [3] => 06:05 [4] => WFH [5] => ZRH [6] => 07:50 ) [11] => Array ( [0] => Jun09Sat [1] => 8274 [2] => 04:00 [3] => 05:00 [4] => MAD [5] => WFH [6] => 07:25 ) [12] => Array ( [0] => Jun10Sun [1] => N/A [2] => [3] => [4] => [5] => [6] => ) [13] => Array ( [0] => Jun11Mon [1] => N/A [2] => [3] => [4] => [5] => [6] => ) [14] => Array ( [0] => Jun12Tue [1] => AAVL [2] => 05:15 [3] => 13:15 [4] => [5] => [6] => ) [15] => Array ( [0] => Jun13Wed [1] => 8973 [2] => 04:05 [3] => 05:05 [4] => WFH [5] => SOF [6] => 08:05 ) [16] => Array ( [0] => Jun14Thu [1] => ADTY [2] => 09:30 [3] => 16:30 [4] => [5] => [6] => ) [17] => Array ( [0] => Jun15Fri [1] => 8233 [2] => 12:25 [3] => 13:25 [4] => WFH [5] => SSP [6] => 15:40 ) [18] => Array ( [0] => Jun16Sat [1] => N/A [2] => [3] => [4] => [5] => [6] => ) [19] => Array ( [0] => Jun17Sun [1] => N/A [2] => [3] => [4] => [5] => [6] => ) [20] => Array ( [0] => Jun18Mon [1] => 807 [2] => 11:35 [3] => 12:35 [4] => WFH [5] => OMV [6] => 14:10 ) [21] => Array ( [0] => Jun19Tue [1] => 8551 [2] => 10:50 [3] => 11:50 [4] => WFH [5] => MJV [6] => 14:30 ) ) Code $html = file_get_contents('rohan.html'); // the table html $range = [ 'start' => [ 'r'=>5, 'c'=>0 ], // specify block of rows/cols 'end' => [ 'r'=>11, 'c'=>21 ] // ( top left is r=0 c=0 ) ]; $results = getColumns($html, $range); function getColumns(&$html, $range) { $rows = []; $kr = 0; $p1 = 0; // find first row in our range for ($r=0; $r<=$range['start']['r']; $r++) { $p1 = strpos($html, '<tr', $p1); ++$p1; } $p1--; for ($kr=$range['start']['r']; $kr<=$range['end']['r']; $kr++) { $rows[$kr] = getCells($html, $range, $p1); $p1 = strpos($html, '<tr', $p1+1); } $cols = []; for ($kc=$range['start']['c']; $kc<=$range['end']['c']; $kc++) { $cols[] = array_column($rows, $kc); } return $cols; } function getCells(&$html, $range, $p1) { $cells = []; for ($kc=$range['start']['c']; $kc<=$range['end']['c']; $kc++) { $p1 = strpos($html, '<td', $p1+1); $p1 = strpos($html, '>', $p1+1); $p2 = strpos($html, '<td', $p1); $cells[$kc] = trim(strip_tags(substr($html, $p1+1, $p2-$p1-1))); } return $cells; }
  15. I've tried simple_html_dom and simplexml and, unsurprisingly, that table defeats all three of us.
  16. Aren't there 3 students in that column?
  17. More likely the coder. mysql_errno() does not exist. It should be mysqli_errno($conn) Try turning error reporting on occasionally.
  18. That is very true. No labelling of the rows, so it's like trying to navigate around a strange city where all the street names have been removed. You don't know if you're looking at a leaving time or the time of the next race at Cheltenham. There doesn't appear to be any consistent pattern below each row of student numbers so without row labels we're f****d. Good luck!
  19. Congratulations. Was someone on commission for every non-breaking space they used in the table's data? But back to the probem - what are you trying to extract from the table?
  20. If your form's action is "this script", just leave out the action attribute altogether. <form method='POST' > . . . </form>
  21. That's a start. But it will leave you trying to insert nothing into your table. Good spot. I didn't even notice he doesn't have a form to submit.
  22. Your only input that has a name is "item", so the others won't appear in the POST array. You also need to check that data has been posted before attempting to access them if ($_SERVER['REQUEST_METHOD'= == 'POST) { // process posted data }
  23. Neither did I until you said you needed them grouped together.
×
×
  • 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.