index php top php 9162020 regist php input

  • Slides: 11
Download presentation

システム全体像 ログイン前 index. php済  ユーザ登録  ログイン top. php 済  求人情報検索  登録情報変更  応募履歴  ログアウト 9/16/2020

システム全体像 ログイン前 index. php済  ユーザ登録  ログイン top. php 済  求人情報検索  登録情報変更  応募履歴  ログアウト 9/16/2020 ログイン後 済 regist. php 済 input. php 済 済 login. php list. php login_check. php detail. php 済 member_info. php apply. php 済 change_pwd. php history. php WEBアプリ実験 logout. php 2

jobテーブル PHP関数 $query = “select * from job”; $result = pg_query($conn, $query); $resultの中身は? id

jobテーブル PHP関数 $query = “select * from job”; $result = pg_query($conn, $query); $resultの中身は? id name category 01 カフェスタッフ フード 02 家庭教師 教育 03 ピザの販売 フード $num = pg_num_rows($result); $numの中身は? 3 $row[category] $row = pg_fetch_assoc($result, 2); $rowの中身は? 9/16/2020 WEBアプリ実験 id name category 03 ピザの販売 フード $row[name] 5

結果の取り出し id name category 0 01 カフェスタッフ フード 1 02 家庭教師 教育 2 03

結果の取り出し id name category 0 01 カフェスタッフ フード 1 02 家庭教師 教育 2 03 ピザの販売 フード $result = pg_query($conn, $query); 行の取り出し $row = pg_fetch_assoc($result, 0); 2); 1); 属性の取り出し $name = $row[name]; $category = $row[category]; 9/16/2020 WEBアプリ実験 6

HTMLで整形 <? php ・・・ $query = “SELECT * FROM job”; $result = pg_query($conn, $query);

HTMLで整形 <? php ・・・ $query = “SELECT * FROM job”; $result = pg_query($conn, $query); $num = ? ? ? print “<table>”; for($i=0; $i<$num; $i++){ $row = pg_fetch_assoc($result, $i); print “<tr>”; print “<td>$row[name]</td>”; print “<td>$row[category]</td>”; ・・・ print “</tr>”; } print “</table>”; 9/16/2020 WEBアプリ実験 ? > forループの終了条件 は自分で考えてみよう Hint 結果の行数・・・ 7