I have a weird issue where I am trying to use PHP in shorthand to output a value saved in the session. (Basically, if you type in a username and email address when signing up, but you get the email address wrong, instead of it clearing the username field it should persist and then you only have to recorrect the incorrect details.)
This is what I have for the output:
value="<?=$usern_value;?>"
Which is in my input:
<input type="text" id="inputUser" name="username" placeholder="Username" value="<?=$usern_value;?>" />
But it outputs this instead:
This is where the value of $usern_value
is created:
<?php
if(isset($_SESSION['status']['register']['username'])){
$usern_value = $_SESSION['status']['register']['username'];
} else {
$usern_value = "";
}
?>