Create Dynamically table at runtime & save it in database

Posted by user1548245 on Stack Overflow See other posts from Stack Overflow or by user1548245
Published on 2012-09-01T09:23:39Z Indexed on 2012/09/04 21:38 UTC
Read the original article Hit count: 206

Filed under:
|

I have written a code for creating table. It displays table structure on GUI form, but what I want is, when I enter values into table it should be stored in database table too. My code:

<?php 
function display($column,$rows)             
{       
    echo "<table border='1' align='center'>";           
    for ($iii = 0;$iii <$_POST['column'];$iii++)        
    { 
        echo "<tr>".$jjj."</tr>";                               //display no. of <tr>
        for ($jjj = 0; $jjj <$_POST['rows'];$jjj++)                         {
        echo "<td>" ."<input type=\"text\" name='$iii'>"."</td>";           }
    }
        echo "</table>";
}
?>

© Stack Overflow or respective owner

Related posts about php

Related posts about table