« Previous Entry | Main | Next Entry »

memo: Flash, PHP パスワード認証

Author:  |  | (0) comments

-fla

btn.onRelease = function() {
	var lv:LoadVars = new LoadVars();
	var lv_receive:LoadVars = new LoadVars();
	lv.lv1 = _root.tf.text;
	lv_receive.onLoad = function(success:Boolean) {
		if(success && this.txt == "success") trace("success");
	}
	lv.sendAndLoad("pass.php", lv_receive, "POST");
}


-php

$receive_text = $_POST['lv1'];
$pass = "xxx";
$a_1 = "success";
$a_2 = "false";

if($receive_text == $pass) {
	echo "txt=$a_1";
} else {
	echo "txt=$a_2";
}

(0) comments:

Leave a comment:

 
 
 
Recent Entry
Category Archive
Monthly Archive
About
Powered by
Movable Type 3.33-ja