Possible Duplicate:
Get variable from PHP to JavaScript
Access a JavaScript variable from PHP
I currently have this line of code:
displaystatus('CALLER IS: '+inCallingNum);
which is being used to display a message on the page saying (e.g.) CALLER IS: 01234 567890.
What I need to do now is set the value of the inCallingNum variable in a PHP variable $user_number. Is this possible?
I tried something like this, but didnt have any luck with it:
<?php $user_number ?> = inCallingNum;
Thanks for any help
Edit:
This is where inCallingNum is set:
inCallingNum = inCallingNum.slice(inCallingNum.lastIndexOf(",")+1, inCallingNum.length);
Edit 2:
I'll try to explain what I'm trying to do more clearly. What I have at the moment is 2 pages, the main page which displays all of the information and a 2nd page which queries the database and pulls out the user's profile. When the javascript variable inCallingNum changes, I need to send this to the user_data.php page and update the information to show the new person's profile.