<pre>1.I want to Enter Multiple values into one Input in HTML Form You can see my hint from the given code below. 2.This is not the Right code that I need. In this code I enter one Value Into Input One time But I need to Enter more Value in one Input <input type="text" name = "number1" size="20"> 3.I want Answer only use For loop and Array please give me proper Full right code
<html> <body> <form method="post"> <input type="text" name = "number1" size="20"> Enter First Number: <input type="submit" name="submit" value="Add"> </form> <?php if(isset($_POST['submit'])) { $number1 = $_POST['number1']; $tex = array( ); $tex[0] = $number1 ; $sum=0; for ($x = 0; $x <= 5; $x++) { $sum = $sum + $tex[0]; echo "The number is: $sum <br>"; } } ?> </body> </html>
<pre>if(isset($_POST['submit'])) { $number1 = $_POST['number1']; $tex = array( ); $tex[0] = $number1 ; $sum=0; for ($x = 0; $x <= 5; $x++) { $sum = $sum + $tex[0]; echo "The number is: $sum <br>"; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)