php - check if client press on option tag -
i need check if isset $_post of 'option' tag.
for example, know when client pressed on 'select' tag i'm doing this:
<?php if (isset($_post['select_tag'])) { echo 'the client pressed on select tag'; } ?> <form method="post"> <select name="select_tag"> <option value="1">1st</option> <option value="2">2nd</option> <option value="3">3rd</option> </select> </form>
i need know if client press on value 1, 2 or 3, there way check it?
in $_post['select_tag']
selected value selectbox
if (isset($_post['select_tag'])) { echo 'the client pressed on select tag '.$_post['select_tag']; }
output:
the client pressed on select tag 1.
Comments
Post a Comment