index.php:
Condition:
<body> <form method="post" action=""> <select name="php[]" multiple="multiple"> <option value="PHP">PHP</option> <option value="Javascript">Javascript</option> <option value="Ajax">Ajax</option> <option value="Jquery">Jquery</option> <option value="HTML">HTML</option> </select> <input type="Submit" value="Submit" /> </form> </body>
Condition:
<?php if(!empty($_POST['php'])){ for ($i=0; $i < count($_POST['php']);$i++) { echo $_POST['php'][$i] . ", "; } } ?>
No comments:
Post a Comment