Writing welcome message with username PHP -


hi quick question, wandering how can output string alongside username generated using sessions

i want code : "welcome, (username)"

this code far outputs username of person logged in, want add "welcome" in front of username.

<?php    if (isset($_session['username'])){    echo '<div id="welcome_msg">'  .$_session['username']. '</div>';                                 } ?> 

you can add non-php content within quotes in echo statement like:

   echo '<div id="welcome_msg">welcome '  .$_session['username']. '</div>'; 

Comments

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -

PHPMotion implementation - URL based videos (Hosted on separate location) -