I’ve been asked to come up with something similar to your need for the registration of new users, ability to U/L an image of themselves to associate with their User Account as well as adding short bios to be displayed with their image.
I’ve skirted this project until now by just statically generating a User Directory and exporting the swf and this was enough to pacify the “client” as they do not have a need for unique login/pwds (and I’m not getting paid for this project so I’ve put it on the back burner).
I guess I’ll try and tackle it now using the same three components (as3, php and mysql). With all of that said…
I’m thinking the initial connection will be done by using the PHP function mysql_connect which links your web page to MySQL under your user authentication. Next the database is selected that holds the table we will be asking for this is done using the PHP function mysql_select_db which sets the active database for the connection.
<?
$databasename=‘database_name’; // Name of the database
$tablename=‘table_name’; // Name of the table
$mysqladd=‘localhost’; // Address to the MySQL Server - Usually localhost or an IP address
$mysqluser=‘MySQL_username’; // Your MySQL UserName
$mysqlpass=‘MySQL_password’; // Your MySQL Password
//CONNECT TO MYSQL
$link=mysql_connect($mysqladd,$mysqluser,$mysqlpass) or die('Database Error: ’ . mysql_error());
//CONNECT TO DATABASE
mysql_select_db($databasename, $link) or die('Could not connect to table: ’ . mysql_error());
?>
Then you will have to build the results. Something like this will return the row that has the requested id. To request the id you would use a URL like: http://www.mydomain.com/single.php?id=5.
Next you are going to have to attach this url to your AS. I would think the best way would be to use the loader class.
As for the user registration I am thinking of incorporating a simple database management system which would be a php file that could be loaded into the swfs user interface.
This is a speculation, of course, until I get in there and have a go at it.
If someone is reading this and thinks I am going about it incorrectly or if there might be an easier way to do this then by all means step in and help. But I think this will be enough to get you started. I will continue to post as I look into this. What is your time frame for project completion? As I said earlier, I’m not getting anything in return for the porject that I am talking about so I will be putting it together in my ‘spare time’.
try something like this as you simple management system.