Hii,

I am working on a php-mysql GUI..MY problem is iam asking the user to input the number of fields he wants on his new table.According to the number inputted dat many number of text boxes should come on the screen .How can i do this ?Is there any way to loop a form or something like dat in PHP or javascript

Member Avatar for rajarajan2017
for ($r = 1; $r <= $rows; $r++) {
        echo "<tr>";
        // loop to create columns
        for ($c = 1; $c <= $columns;$c++) {
            echo "<td>&nbsp;</td> ";
        }     echo "</tr> ";

Just look at the above code there are some td's are created one by one within the loop, instead of that just you use the <td> and within td use the <input type=text> and create no of text boxes you need...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.