0
Php table insert using users input
<!DOCTYPE html> <html> <body> Enter the number :<input type="text" name="txt1"> <input type="submit" name="submit"> <?php if(isset($_POST['submit'])) { $num = $_POST['txt1']; echo "This is table of $num</br> "; for ($x=0; $x <= 10;) { $x++; $table = $num * $x; echo "$table</br>"; }} ?> </body> </html>
2 Respuestas
0
Any one check error
0
What table are you talking about here? I don't see you writing HTML table into the response.
And why not try to do that using JavaScript instead? if you use PHP the number you input will have to be sent to server before a response is returned to be shown by browser.