Hi all,
I have tried many solutions, but I still have trouble on connecting MySQL from
applet.
Project: online Morse code experiment system
Description: the system should allow Morse code listeners to set initial parameters, input what they hear and submit the results. The applet will modify the parameters according to Morse code listeners' grades.
Solution:
Java, PHP, MySQL
Problems:
I do the project on my Macbook. I installed MAMP which means the web server and database server are on the same host. Database host name is 'localhost', port 3306. When I do the prototype
test, my Macbook is also used as the client, which is to say server side and client side are actually on the same computer. Everything works.
Problem came up when I deployed the project to department's server, openSUSE + MySQL + Apache. Web server and database server are on the same host also. Database port 3306. Login and sign up still work via php, but for applet, user cannot 'submit' their test results. I think there must be the MySQL connection problem from applet. But cannot get it.
Code: whole applet is a little bit long, the connDB() is how I connect database