# User account systems with a database...?

**URL:** <https://forum.kirupa.com/t/user-account-systems-with-a-database/262909>\
**Category:** flash\
**Created:** [June 11, 2008, 12:35am UTC](https://forum.kirupa.com/t/user-account-systems-with-a-database/262909 "2008-06-11T00:35:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![idontknow07](https://avatars.discourse-cdn.com/v4/letter/i/82dd89/32.png) [@idontknow07](https://forum.kirupa.com/u/idontknow07)\
**Post date:** [June 11, 2008, 12:35am UTC](https://forum.kirupa.com/t/user-account-systems-with-a-database/262909/1 "2008-06-11T00:35:51Z")

</div>

Hey guys,

I was wondering if anybody can point me in the right direction on how to create a account system for users using flash.

I know I will have to use php/mysql, but I have no idea where to begin…

What I need is to setup a system where users can register, login, play our games to win points to gain access to other areas of the site…

I can create the registration part of the site and the login form… How will I be able to set the login script to read from the database to pull account details and later on save progress to the database for that user?

I hope I make sense…

Thanks.

---

<div class="post-metadata">

**Author:** ![cholin](https://avatars.discourse-cdn.com/v4/letter/c/8edcca/32.png) [@cholin](https://forum.kirupa.com/u/cholin)\
**Post date:** [June 11, 2008, 3:00am UTC](https://forum.kirupa.com/t/user-account-systems-with-a-database/262909/2 "2008-06-11T03:00:17Z")

</div>

For the PHP part, I don’t know how much you know, but I would use sessions to store the user’s variables.

so $\_SESSION[‘username’] = addslashes(… etc

and then simply transfer it all to flash each time a page loads with flash on it – either by XML file (like most game sites use) or setting variables.  
Then when you want to save a score, use XML objects in Flash or URLs to call a php script that updates the score. Make sure that it has some sort of validation because you dont want your users calling updatescores.php?score=50000000…
