Problem in Duplication of data and onenter key

Good day!

I have 2 problems with my code 1st is in the last operation name or the 04 Oper it was duplicate but the duplicate was only the operation name and the rest data was blank . I tried to debug it but I ca’n find where is wrong in my syntax. And the 2nd problem is for the enter key function or array, because my textbox I used array, and to move on the next textbox i used enter key, the problem is on the last date when i press enter key instead of move the cursor on the shift textbox it was save. I want to happen is after the last date and I press enter key the cursor was on the shift textbox then after i input data in shift and i press enter key it will save.

Here is my code:

[PHP]

<?php if($rexist == 0) { $query = "SELECT t.operation_name, t.input_unit, t.output_unit FROM trace_operations t WHERE t.plt_typeno = '" . $_POST["plt_typeno"] . "' AND t.operation_name IN('02 Oper','03 Oper','04 Oper') ORDER BY t.operation_name"; $last_operation_name = ""; $result = mysql_query($query); if($result){ $totalrows = mysql_num_rows($result); $trows = $totalrows - 1; for($ctr = 0; $ctr < $trows; $ctr++) { $row = mysql_fetch_array($result); $tctr = $ctr + 1; echo "\n\t"; echo "\n\t\t"; if ($last_operation_name != $row["operation_name"]) echo $row["operation_name"]; $last_operation_name = $row["operation_name"]; echo ""; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t" . $row["input_unit"]; echo ""; echo "\n\t\t"; echo "\n\t\t" . $row["output_unit"]; echo ""; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t"; } if($totalrows > 1); { $row = mysql_fetch_array($result); echo "\n\t"; echo "\n\t\t"; if ($last_operation_name != $row["operation_name"]) echo $row["operation_name"]; $last_operation_name = $row["operation_name"]; echo ""; echo ""; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t" . $row["input_unit"]; echo ""; echo "\n\t\t"; echo "\n\t\t" . $row["output_unit"]; echo ""; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t"; } echo ""; echo ""; echo ""; } } ?>

[/PHP]

Any help is highly appreciated…

Thank you very much… Ask me a question if my problem did not clear with you.:confused:

Again, Thank you so much

Sponsor our Newsletter | Privacy Policy | Terms of Service