Tuesday, 17 September 2013

How to echo the values of dynamic textbox values in php

How to echo the values of dynamic textbox values in php

I have a code that creates textboxes at run time but to access the values
when user submits after the filling the textbox
<?php
$num = 5;
echo '<form method="post" action="index.php">';
for($i=1; $i<=$num; $i++){
echo "TextBox Number"."$i".'<input type="text" name="txt'.$i.'" />';
echo "<br>";
}
echo '<input type="submit" name="submit">';
echo '</form>';
;
?>

No comments:

Post a Comment