![]() ![]() ![]() ![]() |
|||||
|
|||||
樓主 flashmam2012 ![]()
![]() |
首先用從mySql 取得資料: <?php // Make a MySQL Connection mysql_connect("localhost", "root", "123456") or die(mysql_error()); mysql_select_db("test") or die(mysql_error()); // Get all the data from the "example" table $result = mysql_query("SELECT * FROM login") or die(mysql_error()); // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table echo $row['name']; } ?> 再打算從php讀取, 所以在action script(2.0) : /* first create a new instance of the LoadVars object */ myVars = new LoadVars(); myVars._path = this; myVars.onLoad = function(success) { if (success) { name.text =row("name"); } else { trace(" Error loading variables "); } }; // call the load method to load the php page myVars.load("http://localhost/floder2/login.php");
本篇文章發表於2012-01-03 19:35
|
1樓
最有價值解答
ahsac ![]() |
因為你的php輸出格式不正確, 輸出要長得像這樣 : aa=xxx&bb=xxx, aa和bb是變數名, =後面接變數值, 變數之間用 & 隔開
as2的部份也怪怪的, 改這樣試試: 以上程式沒測試過, 若有問題自己改改看
本篇文章回覆於2012-01-03 19:55
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔-- |
2樓
作者回應
flashmam2012 ![]() |
太感謝大大了..終於出到了
echo "name=$allname"; 少了"_"
本篇文章回覆於2012-01-03 20:12
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔-- |
回覆 |
如要回應,請先登入. |