Ok I have a chat code, a live chat o_O written with basically js
Not by me, my friend wrote it for me, but im starting to understand it a bit ?
Now, as my Title says, I am needing to store a PHP string or get a string from my database and store it into my javascript variable
so when you type “blah” it’ll show
<yourusername>: blah
instead of <time stamp> blah
or just plain
blah
so im wondering how to do this
Im pretty sure JS cant communicate with MySQL, but then again im a noob?
my PHP variable would be “username” i’d just get it from the database
if not possible is there anyway to use PHP to put it somewhere which javascript can also interact with, say, a cookie?