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

What can cause "Required Package 'IndyCore' not found" when compiling a Delphi 2010 project? -

Change the color of an oval at click in Java AWT -