开发者

Uploadify: sending data with scriptData

开发者 https://www.devze.com 2023-02-20 15:11 出处:网络
I want to send the session value with uploadify script. I\'m tryin following in javascript: \'scriptData\': {\'name\':\'<?php echo $_SESSION[name];?>\'}

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)

0

精彩评论

暂无评论...
验证码 换一张
取 消