Reputation:
how it looksI need to set an input value in a php script
<php
<input value="<?php echo $_SESSION['logged_user']->login; ?>">
?>
As you might understand my does not work
Upvotes: 0
Views: 155
Reputation: 219106
Your PHP syntax is very confused. While inside of a <?php ?>
section you're trying to directly write HTML, and trying to open another <?php ?>
section.
Either get rid of the enclosing section:
<input value="<?php echo $_SESSION['logged_user']->login; ?>">
Or keep the enclosing section and use PHP code to output:
<php
echo '<input value="' . $_SESSION['logged_user']->login . '">';
?>
Upvotes: 1