Sender side:
>> <form action="process.php" method="get"/>
>> <input type="text" name="user"/>
>> <input type="submit" value="Send"/>
>> </form>
On Receiver side:
>> <?php
>> $users = $_GET['user'];
>> echo $users;
>> ?>
Checkbox:
Sender side:
>> <form action="process.php" method="get"/>
>> <input type="checkbox" name="fruit[]" value="apel"/>Apel
>> <input type="checkbox" name="fruit[]" value="banana"/>Banana
>> <input type="checkbox" name="fruit[]" value="orange"/>Orange
>> <input type="submit" value="Send"/>
>> </form>
On Receiver side:
>> <?php
>> $fruits = array();
>> $fruits = $_GET['fruit']; // from checkbox is an array
>> foreach($fruits as $values){
>> echo "$values";
>> }
>> ?>
Radio Button:
Sender side:
>> <form action="process.php" method="get"/>
>> <input type="radio" name="gender[]" value="male"/>Male
>> <input type="radio" name="gender[]" value="female"/>Female
>> <input type="submit" value="Send"/>
>> </form>
On Receiver side:
>> <?php
>> $gender = array();
>> $gender = $_GET['gender']; // from checkbox is an array
>> foreach($gender as $values){
>> echo "$values";
>> }
>> ?>
Combo Box:
Sender side:
>> <form action="process.php" method="get"/>
>> <select name="days[]">
>> <option value="sunday">Sunday<option>
>> <option value="monday">Monday<option>
>> <option value="tuesday">Tuesday<option>
>> <select/>
>> <input type="submit" value="Send"/>
>> </form>
On Receiver side:
>> <?php
>> $day = array();
>> $day = $_GET['days']; // from checkbox is an array
>> foreach($day as $values){
>> echo "$values";
>> }
>> ?>
No comments:
Post a Comment