Home Tutorial Php List PHP List Box Post

 
 

PHP List Box Post
Posted on: October 31, 2009 at 12:00 AM
In this part of the tutorial we will learn how to create list box. Example also shows how to retrieve the list box value in php code.

  • The PHP Post List box is used in the form. It contains multiple value
  • User can select one or more values from the PHP list Box
  • This PHP Post List Box is the alternate of Combo box


PHP Post List Box Example

<?php
    if(isset($_POST['country']))
    echo "I belongs to country ".$_POST['country'];
      else {?>

    Select your country <form action='<?php echo $_SERVER['PHP_SELF'];?>' method="post">
    <
select name='country' size="4">
      <
option value='UK'>UK</option>
      <
option value='Canada'>Canada</option>
      <
option value='USA'>USA</option>
      <
option value='India'>India</option>
    </
select>
    <
input type="submit">
    </
form>
<?php
}?>

Related Tags for PHP List Box Post:


Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.