Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Applet calling a php script

  Asked By: Willie    Date: May 12    Category: Java    Views: 1239
  

I managed to send POST data from an applet to a php
script. (I could see the output of the script (the
html code) through the Java Console)

But what I wanted was to actually run the script. When
the user clicks a button, the applet sends the post
data and run the php script. (which means the user
will be sent to an html page that was the output of
the php script)

How can I do this?

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Jana Franklin     Answered On: May 12

You can do this using GET and showDocument().

Otherwise, the only way to do it that I know of is to have the PHP script
save its output  to a file on the server and then use showDocument() to
have that output appear in a new window.

 
Answer #2    Answered By: Clay Cook     Answered On: May 12

>You can do this using GET and showDocument().

Do you mean sending the data  through GET instead of
POST? If so, I can´t do this, it´s a lot of
information....

If not, how can I do this?

>Otherwise, the only way to do it that I know of is
>to have the PHP script
>save its output  to a file on the server and then use
>showDocument() to have that output appear in a new
>window.

Yes, I saw an article about that... it´s quite a lot
of work, isn´t it?

Do you happen to know a PHP script  that does that?
I know this is a java  list... but I wanted  to get an
idea of the steps I have to take: the script to save
the file can be on the same script that generates the
HTML and is called from the applet? And after the file
is saved, how do I send  the user  to this file? (do I
use rediretion?)

 
Didn't find what you were looking for? Find more on Applet calling a php script Or get search suggestion and latest updates.




Tagged: