php - can't pass value in select option -


this code in test1.php

<?php if ($_post['check']!= ""){ $a = $_post['translation'];  } ?> <html> <form action="test2.php" method="post"> <select name="translation"> <option selected="selected" value="1">vietnamese-english</option> <option value="2">english-vietnamese</option> </select> <input type="submit" value="check" name="check"> </form> </html> 

and in test2.php echo value $a nothing. value null when use var_dump($a)

this part of code in form, doesn't belong there:

<?php if ($_post['check']!= ""){ $a = $_post['translation'];  // echo $a; // added } ?> 

it belongs in test2.php file, why not getting results.


Comments

Popular posts from this blog

How to run C# code using mono without Xamarin in Android? -

c# - SharpSsh Command Execution -

python - Specify path of savefig with pylab or matplotlib -