00:00
00:00
Newgrounds Background Image Theme

Wettle just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Flash And Php Login

348 Views | 0 Replies
New Topic Respond to this Topic

Flash And Php Login 2014-06-22 15:22:39


Hello.
I have problem with Flash login.
So this is my login.php code
<?php
mysql_connect("localhost","root","") or die();
mysql_select_db("flashspele") or die();
$check = mysql_query("SELECT * FROM users WHERE username = '".$_POST['username']."'")or die();
$check2 = mysql_num_rows($check);
if ($check2 == 0) {
print "words=User doesn't exist.&checklog=3";
die();
}
while($info = mysql_fetch_array( $check ))
{
if ($_POST['pass'] != $info['password']) {
print "words=Incorrect Password.&checklog=4";
die();
}else
{
print "words=You are logged in.&checklog=5";
die();
}
}
?>
And this is code what i use in Flash.Insade buttun.
on (release) {
if (username != "" && pass != "") {
loadVariablesNum("login.php", 0, "POST");
_root.words = "Begin login process";
gotoAndStop("Frame name");
}else{
_root.words = "Please enter a username and password";
}
}
It will be nice if someone can tell me how to make flash send info to php and back.Then continio gotoAndStop function.