I am not sure if the following validation can be done with if shorthand.
//if $error is set, echo $errro or just echo blank string.
(isset($error)) ? echo $error:echo '';
I know I got it wrong, Anyone here can help me to correct my code? Thanks a lot.