Home Tutorial Php List PHP List Box Post

 
 

Share on Google+Share on Google+
PHP List Box Post
Posted on: October 31, 2009 at 12:00 AM
Advertisement
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
}?>

Advertisement

Related Tags for PHP List Box Post:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: October 31, 2009

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com