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>

27th Oct 2019, 5:32 AM
Raj Kushwaha
Raj Kushwaha - avatar
2 Answers
0
Any one check error
27th Oct 2019, 5:32 AM
Raj Kushwaha
Raj Kushwaha - avatar
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.
27th Oct 2019, 9:52 AM
Ipang