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

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -