[英]passing variable from php page to java applet
I am trying to pass variable from php to java applet. 我试图将变量从php传递到java applet。 This is the code at php side.
这是php端的代码。 The session variable is not empty and contains the email address I checked it.
会话变量不为空,包含我检查过的电子邮件地址。
$email=$_SESSION['Email'];
<applet code='mainapplet' archive="applet.jar" width="600" height="400">
<param name="email" value="<?php echo $email; ?>" />
</applet>
In the applet I have this code inside the applet init method 在小程序中,我在小程序init方法中有此代码
email=this.getParameter("email");
but the string variable email is always returning null. 但字符串变量email始终返回null。 Where am I wrong This is the HTML generated code
我在哪里错了这是HTML生成的代码
<applet code='mainapplet' archive="applet.jar" width="600" height="400">
<param name="email" value="sangwan.ritesh@yahoo.in" />
</applet>
<param name="email" value="<?php echo $email;"/>
应该..
<param name="email" value="<?php echo $email;?>"/>
您没有关闭PHP标记:
<param name="email" value="<?php echo $email;?>"/>
您忘记了PHP结束标记。
<?php echo $email;?>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.