¸ù¾Ýidɾ³ýÊý¾Ý¿âÖÐÒ»ÐмǼ£¬³É¹¦·µ»Ø"f"£¬Ê§°Ü·µ»Ø"t"¡£
<?php require_once 'smarty2_head.php'; //mysql_connect $conn = mysql_connect(DB_HOST, DB_USER, DB_PASS) or die("connect failed" . mysql_error()); mysql_select_db(DB_DATABASENAME, $conn); //params $id = $_POST['id']; //delete row in db $sql = sprintf("delete from %s where id=%d", DB_TABLENAME, $id); $result = mysql_query($sql, $conn); mysql_close($conn); if ($result) echo "t"; else echo "f"; ?>8£®ÐÂÔö¼ÓµÄupdata.php
¸ù¾ÝidÐÞ¸ÄÊý¾Ý¿âÖÐÒ»ÐмǼ£¬³É¹¦·µ»Ø"f"£¬Ê§°Ü·µ»Ø"t"¡£
<?php require_once 'smarty2_head.php'; //mysql_connect $conn = mysql_connect(DB_HOST, DB_USER, DB_PASS) or die("connect failed" . mysql_error()); mysql_select_db(DB_DATABASENAME, $conn); //params $id = $_POST['id']; $name = $_POST['name']; $age = $_POST['age']; //updata db $sql = sprintf("update %s set,age=%d where id=%d", DB_TABLENAME, $name, $age, $id); $result=mysql_query($sql, $conn); mysql_close($conn); if ($result) echo "t"; else echo "f"; ?>³ÌÐòÔËÐнá¹ûÈçÏ£¨Win7 +IE9.0£©£º
±¾ÈËCSSѧµÄÌ«²Ë¡£ËùÒÔ±í¸ñµÄ²¼¾Ö½«¾ÍµãÁË¡£
תÔØÇë±êÃ÷³ö´¦£¬ÔÎĵØÖ·£º
¡¡