a wynki powinny byc zapisane do tablicy mysql
niestety rezultat Test
Czy jest ktos kto moglby poprawic moj kod tak aby dzialalo albo podac jakis poglad co robie zle
Tak wyglada moj kod strony :
<head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta http-equiv="Content-Style-Type" content="text/css"> <meta http-equiv="Content-Script-Type" content="text/javascript"> <script type="text/javascript"> var clone; function cloneDiv(){ var divs=document.getElementById('myDiv').getElementsByTagName('div'); clone=divs[divs.length-1].cloneNode(true); } function addDiv(){ var root=document.getElementById('myDiv'); var divs=root.getElementsByTagName('div'); root.appendChild(clone); clone=divs[divs.length-1].cloneNode(true); } onload=cloneDiv </script> </head> <body> <form id="myForm" action="summary.php" method="post"> <p> <input type="hidden" name="id" /> </p> <table width="200" border="1"> <tr> </tr> <tr> </tr> </table> </table> <div id="myDiv"> <div> <table width="640" height="91" border="1"> <tr> </tr> <tr> </tr> </table> </div> </div> <input name="button" type="button" value="Next Line / Broadband" onclick="addDiv()"> </form> </body>
a tak php
<?php if (!$con) { } $sql="INSERT INTO ttest (id, sagent, vagent, lines, lstatus, broadband, bbstatus) VALUES ('$_POST[id]','$_POST[sagent]','$_POST[vagent]','$_POST[lines]','$_POST[lstatus]','$_POST[broadband]','$_POST[bbstatus]')"; { } ?>
SQL
CREATE TABLE `NewTable` ( `id` int NULL , `sagent` text NULL , `vagent` text NULL , `lines` int NULL , `lstatus` text NULL , `broadband` int NULL , `bbstatus` text NULL , PRIMARY KEY (`id`) ) ;