What is preferred isset($_POST['start_time']) or @$_POST['start_time']
What is preferred isset($_POST[‘start_time’]) or @$_POST[‘start_time’]
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Neither.
issetis "this exists and has a value", and that’s not always what you want.Consider
array_key_existsinstead:Too annoying? Also consider
filter_input, with the appropriateINPUT_POSTorINPUT_GETflag. Shorter, neater, built-in validation, and no notices about missing keys.