<%=session("MM_Username")%> PHP

<%=session(“MM_Username”)%>

Im making a basic forum in PHP. I don’t really know much code and am using Dreamweaver for most of the project. Basically when i come to post a post i want the logged in members name to come up on the post. I’ve a hidden field which will insert the users name into the databases post table, but i have worked on a task similar in ASP and the above code is what i used, but i can’t work out the PHP version?

Can anyone help please.

Also while im here how would i have a field which when the user was logged in said welcome -username-. (displaying user name)

any help apprechiated!, dave


<?php echo $_SESSION["MM_Username"];?>

That should do it :slight_smile:

thank you very much, after a bit of code juggling around and editing to my insert record server query, (because i added this user-name field later), i added your suggested code into my page and it works fine. i tried guessing the code from

<%=session(“MM_Username”)%>

and was using something like that, not far off but not near enough,

<?php echo(“MM_Username”);?>

and my second question to add the name you just add that code onto the page! excellent thanks allot! so thats answered too !!!

nice one njs12345
bmpzMTIzNDU= , dave