interacting with php(output)

ok, so I am making an rpg. I am storing my users in a mySQL database.

I am having dificulty saving the files back to the database.

I was jsut going to try doing like I would do it like I would in a browser. so I jsut make the url include the info, for example: url.com/watever.php?username=test

and so on.

this is the java code.

URL url = new URL(url with info);
URLConnection connection = url.openConnection();

am I going to have to make an output stream and spoon feed the php file?

thx in advance

sry turns out my error was in the loading.

saving worked fine :/.