Here you go
if(isset($_POST['handler_name']) && ($_POST['handler_name'] == $h_name)) {
}
Question
I have here PHP code that will check if the value is posted and I want to check its value in single line of code.
I have here a single code, I know that this is wrong because I always get the wrong value.
if(isset($_POST['handler_name']) == $h_name){
}
THANKS!
Solution
Here you go
if(isset($_POST['handler_name']) && ($_POST['handler_name'] == $h_name)) {
}
OTHER TIPS
if(isset[$_POST['handler_name'])?(if([$_POST['handler_name'])?echo "equal":echo "not equal"):echo "not set";