Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(isset($_REQUEST['save']))
- {
- //get the form value and store in $array
- $array=$_REQUEST['arr'];
- //get the $array index and value store them in $key and $value
- foreach($array as $key=>$value)
- {
- //display the index of associative array and value
- echo $key." : ".ucfirst($value)."<br/>";
- }
- }
- ?>
- <form method="post">
- <tr>
- <td width="159">Name</td>
- <td width="108"><input type="text" name="arr[Name]"/></td>
- </tr>
- <tr>
- <td>Email</td>
- <td><input type="email" name="arr[Email]"/></td>
- </tr>
- <tr>
- <td>Mobile</td>
- <td><input type="number" name="arr[Mobile]"/></td>
- </tr>
- <tr>
- <td>Address</td>
- <td><textarea name="arr[Address]"></textarea></td>
- </tr>
- <tr>
- <td colspan="2" align="center">
- <input type="submit" value="save" name="save"/>
- </td>
- </tr>
- </form>
Add Comment
Please, Sign In to add comment