Please can someone point out what I'm missing here - I'm sure it's something obvious....
I'm trying to get my page to set a javascript variable based on form input from previous page (so that I can do user tracking in Clicky)
My code reads:
But this always gives me an output of :
I can't seem to get it to insert $ClickyUserName
When I echo $ClickyUserName by itself, I get the contents of the Request string back, so that's not the problem.
What am I missing?
I'm trying to get my page to set a javascript variable based on form input from previous page (so that I can do user tracking in Clicky)
My code reads:
Code:
$ClickyUserName=str_replace(' ', '', $_REQUEST['CustomerName']);
$ClickyCustom = '
<script type="text/javascript">
var clicky_custom = {};
clicky_custom.session = {
username: "'.$ClickyUserName.'"
};
</script>';
echo $ClickyCustom;
But this always gives me an output of :
HTML:
<script type="text/javascript">
var clicky_custom = {};
clicky_custom.session = {
username: ""
};
</script>
I can't seem to get it to insert $ClickyUserName
When I echo $ClickyUserName by itself, I get the contents of the Request string back, so that's not the problem.
What am I missing?