File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes Applet/PHP/MySQL problems! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet/PHP/MySQL problems! " Watch "Applet/PHP/MySQL problems! " New topic

Applet/PHP/MySQL problems!

Anton Westbergh

Joined: Mar 24, 2004
Posts: 5
Hi all!
I am quite new, and not very experienced in programming at all.
I am currently making a Tetris-clone, which you can try here:
Now to the problem. I have put up a MySQL database, and coded some PHP-pages. I had planned to use these PHP-pages from my applet, to be able to store highscores etc, but it's not working very well.
I don't want to open up new browser windows, since then the user can see the whole adress, and abuse of the highscoresystem will be very common.
I've tried to let my Applet connect to the php-pages via URL and stuff, but nothing seems to work very well.
If you have any experience of Applets, and MySQL-databases, please don't hesitate to answer! I need all help I can get. I've never been in touch with PHP or MySQL before, so this is new ground for me.
I have not been programming for a very long time neither, so please try to go easy with me
Any help is appreciated!
/Anton Westbergh
Anton Westbergh

Joined: Mar 24, 2004
Posts: 5
And AppletContext.showDocument() isn't an option, since it shows the whole URL to the user..
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

You didn't say if the applet's being downloaded from the PHP server. Java sandbox rules prohibit unsigned applets from accessing servers other than the one they loaded from.

An IDE is no substitute for an Intelligent Developer.
Anton Westbergh

Joined: Mar 24, 2004
Posts: 5
The applet is on the same server.
Any id´┐Ża how to solve this?
I fear I will have to get the applet talk with the MySQL database instantly..
Please help!
I agree. Here's the link:
subject: Applet/PHP/MySQL problems!
It's not a secret anymore!