I am looking for email in my view page. there are two ways email can get there. Either by POST or by SESSION.
if it is a $_POST then I want to use the $_POST email other wise I want to use the email saved in session.
Currently the code I have is below
$email = (isset($_POST['email']) ? $_POST['email'] : '');
whats the BEST way to do it in least lines of code
I’m guessing you’re just looking for this (assuming the email address is stored in the
$_SESSIONarray under the keyemail):Or am I misunderstanding your question?