Toggle main menu visibility
新聞
下載
教材
影音
討論
其他選單
好站連結
行事曆
電子相簿
常見問題
萬用表單
即時留言簿
友站消息
社大學員
:::
登入
登入
帳號
密碼
登入
重整畫面
:::
所有書籍
「[1002] PHP入門班」目錄
MarkDown
13. 資料檢查
1. PHP入門
2. 使用者輸入介面設計
2-1 上課範例:index.php
2-2 上課範例:save.php
3. PHP變數與常數
3-1 上課範例:a1.php
4. PHP資料類型與建立資料表
4-1 上課範例:add_class.php
5. 連線資料庫及運算元
5-1 上課範例:save_class.php
5-1 上課範例:add_class.php
6. 讀取資料庫及PHP陣列
6-1 上課範例:add_class.php
6-2 上課範例:save_class.php
6-3 上課範例:index.php
7. 編輯與刪除功能
7-1 上課範例:index.php
7-2 上課範例:add_class.php
7-3 上課範例:save_class.php
8. 函數與小強佈景
8-1 上課範例:index.php
8-2 上課範例:add_class.php
8-3 上課範例:save_class.php
9. 流程控制與迴圈
9-1 上課範例:add_class.php
9-2 上課範例:theme.html 樣板檔
9-3 上課範例:save_class.php
9-4 上課範例:index.php
9-5 上課範例:header.php
9-6 上課範例:function.php
10. 練習練習再練習!
10-1 上課範例:index.php
10-2 上課範例:add_class.php
10-3 上課範例:save_class.php
10-4 上課範例:index.php(整合版)
10-5 上課範例:header.php(整合版)
11. 建立學習收藏的發布頁
11-1 上課範例:class.php
11-2 上課範例:header.php
11-3 上課範例:tad0616.sql
11-4 上課範例:blank.php 空白樣板
11-5 上課範例:index.php
12. 兩個資料表的結合
12-1 index.php
13. 資料檢查
13-1 上課範例:index.php
13-2 上課範例:header.php
13-3 上課範例:function.php
13-4 上課範例:class.php
14. 請完成基本功能囉~
14-1 上課範例:index.php(完成版)
15. 認證與session
15-1 上課範例:class.php
15-2 上課範例:config.php
15-3 上課範例:header.php
15-4 上課範例:index.php
16. 分頁與編輯器
16-1 上課範例:index.php
16-2 上課範例:header.php
17. 用PHP上傳檔案
17-1 上課範例:index.php
18. 資料搜尋
18-1 上課範例:index.php
18-2 上課範例:theme.html
13-2 上課範例:header.php
\[1002\] PHP入門班 =============== ``` function delete_func(sn){ var sure = window.confirm('確定要刪除此資料?'); if (!sure) return; location.href='{$_SERVER['PHP_SELF']}?op=delete&sn=' + sn; }
"; while($data=mysql_fetch_assoc($result)){ //$sql="select class_name from `tncomu_class` where class_sn='{$data['class_sn']}'"; //$result2 = mysql_query($sql) or die("無法執行:".mysql_error()); //list($class_name)=mysql_fetch_row($result2); $main.="
{$data['class_name']}
{$data['stud_name']}
{$data['post_time']}
{$data['counter']}
刪除
|
編輯
"; } $main.="
"; return $main; } //輸入學習收藏的表單 function article_form(){ $now_seme=get_seme(); $sql="select class_sn,class_name from tncomu_class where access='1' and seme='{$now_seme}' "; $result=mysql_query($sql) or die($sql); $opt=""; while(list($class_sn , $class_name) = mysql_fetch_row($result)){ $opt.="
$class_name
"; } $main="
輸入學習收藏
您的姓名:
{$now_seme}班級:
請選擇{$now_seme}班級
$opt
學習收藏內容
設定密碼:
是否發布?
發布
暫不發布
"; return $main; } //執行儲存動作 function insert_article(){ $stud_name=trim($_POST['stud_name']); $stud_name = (! get_magic_quotes_gpc()) ? addslashes($stud_name) : $stud_name; $_POST['content'] = (! get_magic_quotes_gpc()) ? addslashes($_POST['content']) : $_POST['content']; $_POST['text_passwd'] = (! get_magic_quotes_gpc()) ? addslashes($_POST['text_passwd']) : $_POST['text_passwd']; $class_sn=intval($_POST['class_sn']); $sql="INSERT INTO `tncomu_article`(`stud_name`, `content`, `post_time`, `enable`, `class_sn`, `mode`, `text_passwd`) VALUES ('{$stud_name}' , '{$_POST['content']}' , now(), '{$_POST['enable']}', '{$class_sn}', '文字', '{$_POST['text_passwd']}')"; mysql_query($sql) or die(mysql_error().$sql); return "儲存完畢"; } ?> ```
:::
搜尋
search
進階搜尋
QR Code 區塊
快速登入
所有討論區
「PHP全端開發」線上課程討論區
XOOPS使用討論區
一般研習學員
社大學員專用
路過哈啦區
XOOPS佈景設計
XOOPS模組開發
Tad書籍區
即時留言簿
書籍目錄
展開
|
闔起
線上使用者
84
人線上 (
9
人在瀏覽
線上書籍
)
會員: 0
訪客: 84
更多…