I wonder if there any better ideas to solve the problem below,
I have a form with a number of input fields, such as,
It is an interesting question and I await the answers.
However, little trick, you can do inline :
$pg_title = isset($_POST['pg_title']) && !empty($_POST['pg_title']) ? $_POST['pg_title'] : null;