The Daily Click ::. Forums ::. Klik Coding Help ::. PHP & MySQL Login/Register System
 

Post Reply  Post Oekaki 
 

Posted By Message

Haris Ahmed



Registered
  14/06/2006
Points
  237
6th July, 2006 at 23:20:55 -

Hello again, I have created a simple login/register system using PHP and MySQL. It is located at http://pokemonol.net/main.php I now want to allow users to login to my game (once they have registered by using my PHP system) with the actual game client. I need help as I don't know how to get MMF to gain access to the MySQL database (where all the user info is stored) and allow users to login, if what they entered matches the MySQL user database. I also want to allow users to have the option of registering through the game client aswell as the website, where all their account info they entered would be sent and stored in the MySQL database. How would I do this? Can anyone help solve this problem? Is there any example files that would do the same thing?


 
Pokemon Online: pokemonol.net

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
6th July, 2006 at 23:46:55 -

Only thing I can really suggest would be to try out MooSock, I don't know how you would do it, but it's worth looking up.

 
http://www.facebook.com/truediamondgame

Flava



Registered
  30/07/2002
Points
  684

Has Donated, Thank You!Code MonkeyVIP MemberThe Cake is a LieThe Spinster
7th July, 2006 at 05:44:23 -

As far as I am aware, MMF can't directly connect to a MySQL database.
You just have to use MooSock as Brandon stated.

So for example, when your user clicks login - get MooSock to connect to http://www.mysite.com/login.php?name=Username&password=Password - then get the page to return a value such as 1 (if logged in) and 0 (if not logged in).

It's a pretty insecure way of logging in, and can cause more problems than good. It's best if you actually use a proper server to store user details - but if you only have a web server then I think that's the best way to do it.

 
This is a signature. Have this one on me.

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
7th July, 2006 at 06:15:55 -

I've no idea if this is new to MMF2 or not, but the ODBC object can connect to MySQL databases - the trouble is that many servers will block queries that don't come from the server itself. If that happens, PHP with MooSock may be the way to go anyway.

 
http://www.davidn.co.nr - Games, music, living in America

Flava



Registered
  30/07/2002
Points
  684

Has Donated, Thank You!Code MonkeyVIP MemberThe Cake is a LieThe Spinster
7th July, 2006 at 12:28:01 -

Hm I've never noticed that object before.. haven't got a clue how you could get it to connect to a MySQL database though (although it does say it connects to external databases )

 
This is a signature. Have this one on me.
   

Post Reply



 



Advertisement

Worth A Click