<?php
if(isset($_GET['hobbie']))
echo "My
hobbie is ".$_GET['hobbie'];
else {?>
Select your hobbie <form action='<?php echo $_SERVER['PHP_SELF'];?>'>
<select
name='hobbie'
size="4">
<option
value='music'>music</option>
<option
value='reading'>reading</option>
<option
value='swimming'>swimming</option>
</select>
<input type="submit">
</form>
<?php }?>
output
My hobbie is music
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.