开发者

Getting variable in iframe

开发者 https://www.devze.com 2023-01-01 21:46 出处:网络
I开发者_开发知识库\'m passing a varaible to a iframe but can\'t seem to access this variable via the global get variable.

I开发者_开发知识库'm passing a varaible to a iframe but can't seem to access this variable via the global get variable.

<iframe src="uploadContract.php?clientid={$clientid}" frameborder="0" height="95"></iframe>

in uploadContract.php I try to access the variable like $_GET['clientid'];

Somehow I can't seem to get the value via the Get global

What am I doing wrong?

What I noticed is that this iframe is within another frame, if I display the iframe not within a frame it actually works. How can I get this to work within a frame?


Check in the html that the src is really what you think it is. Then try var_dump($_GET); from uploadContract.php


I doubt that the problem is in the code snippet that you present here. Are you sure that $clientid has a valid value when you try to use it in the above snippet?

0

精彩评论

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