Uploadify: sending data with scriptData
I want to send the session value with uploadify script. I'm tryin following in javascript:
'scriptData': {'name':'<?php echo $_SESSION[name];?>'}
and in the php script im ge开发者_如何转开发tting the value like:
$name = $_GET['name'];
The script data returns the value <?php echo $_SESSION[name];?>
instead of getting the value stored in session, for example Peter. Can someone please tell me how can i fix it?
Thanks
I think this is what you're looking for.
'scriptData': {'name':<?php echo "'".$_SESSION[name]."'";?>}
I think your are modifying a .js file instead of a .php file. So, a .js file will never execute php code (between tags)
精彩评论