|
http://appinventor.mit.edu/explore/ai2/custom-tinywebdb.html
http://mouse.oit.edu.tw/Data/AI2/Demo/ch13/ch13_2%20%a4U%b8%fc%a4%ce%a6w%b8%cbTinyWebDB%ac%db%c3%f6%aa%ba%b3n%c5%e9/]ch13_2 下載及安裝TinyWebDB相關的軟體/ |
https://www.python.org/downloads/
https://cloud.google.com/appengine/downloads?hl=zh-TW
https://appengine.google.com/
http://ai2.appinventor.mit.edu/r ... customtinywebdb.zip
作業 :
將學號和姓名的輸入和輸出結果放置 Mysql , 並可顯示.需有Listpicker
http://Your_IP/db_insert.php?ID=123456789&Name=Shie
<?php
header("Content-Type:text/html;charset=utf-8");
$db=mysql_connect("localhost","root","123456");
mysql_select_db("test");
if (!$db)
{
die("connect error" . mysql_connect_error());
}
else
{
echo "Success!";
}
mysql_query("set names 'utf8'");
$ID = $_GET['ID'];
$Name = $_GET['Name'];
$query = "INSERT INTO `practice`(`ID`, `Name`) VALUES ($ID, '$Name');";
$result = mysql_query($query) or trigger_error("Query MySQL Error;".mysql_error($db));
mysql_close($db);
?>
<?php
header("Content-Type:text/html;charset=utf-8");
$db=mysql_connect("localhost","root","123456");
mysql_select_db("test");
if (!$db)
{
die("connect error" . mysql_connect_error());
}
mysql_query("set names 'utf8'");
$ID = $_GET['ID'];
$query = "SELECT * FROM `practice` where ID=$ID;";
$result = mysql_query($query) or trigger_error("Query MySQL Error;".mysql_error($db));
while ($row = mysql_fetch_assoc($result)) {
echo $row['ID'];
echo " ";
echo $row['Name'];
}
mysql_close($db);
?>
<?php
header("Content-Type:text/html;charset=utf-8");
$db=mysql_connect("localhost","root","123456");
mysql_select_db("test");
if (!$db)
{
die("connect error" . mysql_connect_error());
}
mysql_query("set names 'utf8'");
$ID = $_GET['ID'];
$query = "DELETE FROM `practice` where ID=$ID;";
echo "<br><br>".$query."<br>";
$result = mysql_query($query) or trigger_error("Query MySQL Error;".mysql_error($db));
mysql_close($db);
?>
|
本帖子中包含更多資源
您需要 登錄 才可以下載或查看,沒有帳號?立即註冊
x
|