Hello Everyone, I am new to php so i am looking for some advice from you guys.
I am wanting building a login system in Flash for my website. So every new user i can organize and store information into the mysql database.
The database and table i have already created. My table has 4 coulumns id, username, password and email.
I have two ActionScript 3.0. fla files login and register i have a general idea how to code these files.
However, when it come’s to the php file i am struggling . My code is below i know it probably has errors in because i am complete novice to php. I would appreciate it if you could highlight the mistakes and tell me if there is anything missing in the file that should be there. I don’t expect you to do all the work for me im just some advice. Thanks.
<?php
//Declare variables
$username = $_POST['username'];
$password = $_POST['password'];
//
//mysql connection variables
$email = $_Post['email'];
$username = $_POST['username'];
$password = $_POST['password'];
$age = $_POST['age'];
$country = $_POST['location']
//
//connects to database
$link = mysql_connect("localhost","example_database","password") or die (mysql_error());
mysql_select_db("example_users") or die(mysql_error());
?>
$email = $_Post['email'];
$username = $_POST['username'];
$password = $_POST['password'];
$age = $_POST['age'];
$country = $_POST['location']
//collects data from table
$data = mysql_query("SELECT * FROM users");
$results = mysql_query($query)
or die(mysql_error());
//put users info into the $info array
$info = mysql_fetch_array( $data ))
$userbio = $data["name"];
echo "systemResult=$userbio";
}
} else {
echo "systemResult=The login detail dont much our records
}
?>