# \<%=session("MM\_Username")%\> PHP

**URL:** <https://forum.kirupa.com/t/session-mm-username-php/64263>\
**Category:** Uncategorized\
**Created:** [September 14, 2004, 5:23pm UTC](https://forum.kirupa.com/t/session-mm-username-php/64263 "2004-09-14T17:23:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Davese](https://avatars.discourse-cdn.com/v4/letter/d/e19b73/32.png) [@Davese](https://forum.kirupa.com/u/Davese)\
**Post date:** [September 14, 2004, 5:23pm UTC](https://forum.kirupa.com/t/session-mm-username-php/64263/1 "2004-09-14T17:23:32Z")

</div>

\<%=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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 14, 2004, 7:56pm UTC](https://forum.kirupa.com/t/session-mm-username-php/64263/2 "2004-09-14T19:56:08Z")

</div>

```php

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

```

That should do it 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 15, 2004, 11:51am UTC](https://forum.kirupa.com/t/session-mm-username-php/64263/3 "2004-09-15T11:51:15Z")

</div>

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
