Sunday, October 5, 2014

Get form data (get method)

1:  <?php  
2:       $test = $_GET["test"];  
3:       $test2 = $_GET["test2"];  
4:       echo $test;  
5:       echo "</br>".$test2;  
6:       $len = strlen($test);  
7:       if($len > 0)  
8:       {  
9:            echo "</br>".$len + strlen($test2);  
10:       }  
11:       else  
12:       {  
13:            echo "error : there is no input";  
14:       }  
15:  ?>  
16:  <form method = "GET" action = "Basic3.php">  
17:       <input type= "text" name="test" >  
18:       <input type="text" name="test2">  
19:       <input type="submit" value="submit">  
20:  </form>  

No comments:

Post a Comment