View Full Version : Passing PHP variables to a java applet

03-23-2007, 12:28 PM
I'm trying to send a PHP variable to a java applet, is this possible? I can't find any information on how to do it. (the variable is a file location that the applet will then use)


03-23-2007, 04:30 PM
You would probably be better off using AJAX.

03-24-2007, 06:29 AM
This depends really on how the php variable and the applet co-exist. Now, applets tend to rely on server side languages to communicate with the databases (if they are off server), and data can be passed in several methods, using xml is one option. However, if its one way, don't complicate the usage, and just throw it in as a parameter, the value of the php variable can be used in the param definitions.

Hope that helps you

Quick throw in too

<applet (or object) code="codeForApplet.class" ...>
<param name="variableToPass" value="<?php echo $variableToPass; ?>" />
You do not support applets