Page 1 of 1

pass a variabile between php pages with javascript:void(0)

Posted: Sun Jan 29, 2012 10:37 pm
by morpheus90
Hi everyone, i'm half new with php, I'm builing my own website and i have a big problem
Time ago I've found a php chat and i've putted on my site
I need to create a page that allows a group of people to write to a "fake" user (a kind of bot), so all the messages coulded be showed because it was all on a database, and i did it
Now next step :D
I wish different pages but all with the same "fake" user
I've insered of the field of the message, the field "argument" filled with the name of the php page
The page chat uses to chat.php page, where all the functions are (send message, recieve message etc,)
Of course, when i send my message from mypage.php, the field "argument" is filled with chat.php, because it's chat.php that make everything
How can i pass the name of the page (mypage.php) to the page chat.php so i can fill argument?
The only link between the pages is this

Code: Select all

<a href="java-script:void(0)" onClick="java-script:chatWith('user')">Chat with user</a>
and that's it, how can i do?
thanke you for all the answers :)