Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 138163

Can't grab a stored username in tag

$
0
0

I'm trying to make a chatroom and the username should be the same as the username you use when you log into my website which i store in a variable, I use the exact same code and that works but when i write this:

function do_send(){ name=<?php echo $_SESSION['uid']; ?>; note=$("#note").val();

it doesn't work, nothing shows up, the weird thing is when i change 'uid' to 'id' it works, but the id is just a number you get when signing up so nothing useful.

It worked for me when i wanted a message to show up that you were logged in to the website and the username should show up which is almost the same code echo $_SESSION['uid']

Sorry if this is quite messy, never uploaded something here before so i'm not familiar with the options/settings.


Viewing all articles
Browse latest Browse all 138163

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>