ok, i’m pretty much doing the tutorial verbatim, it appears everything is working, but my movie doesn’t advance! the only difference between the tutorial and my movie is that my login is in a movie instead of on the main timeline, but i have addressed that by changing
_root.checklog -> this.checklog
anyone that could help? i’ve been freaking out about this for too long…
here’s the code on frame 1:
stop();
userinput.restrict=“a-zA-Z0-9”;
Selection.setFocus(userinput);
passinput.restrict=“a-zA-Z0-9”;
status=“Enter your information and submit”;
this.onEnterFrame = function () {
if(this.checklog == 1){
gotoAndStop(2);
}
if(this.checklog == 2){
gotoAndStop(3);
}
}
here’s the PHP:
<?
$user = $_POST[‘user’];
$pass = $_POST[‘pass’];
//connect to database
if ($user && $pass){
mysql_pconnect(“server”,“username”,“password”) or die (“didn’t connect to mysql”);
mysql_select_db(“mydb”) or die (“no database”);
//make query
$query = “SELECT * FROM mytable WHERE username = ‘$user’ AND password = ‘$pass’”;
$result = mysql_query( $query ) or die (“didn’t query”);
//see if there’s an EXACT match
$num = mysql_num_rows( $result );
if ($num == 1){
print “checklog=1”;
} else {
print “checklog=2”;
}
}
?>