hands_on_4.PDF

Similar documents
PHP と Postgresql を用いた 図書館管理システムの構築 裘彬濱 Qiu Binbin 南山大学 情報理工学部

Microsoft PowerPoint - myadmin.ppt


_IMv2.key

2009 Web B012-1


Taro php.jtdc

3 Powered by mod_perl, Apache & MySQL use Item; my $item = Item->new( id => 1, name => ' ', price => 1200,

ii II Web Web HTML CSS PHP MySQL Web Web CSS JavaScript Web SQL Web

- 2 Copyright (C) All Rights Reserved.

ビジネスサーバ設定マニュアル_Standard応用編


CMP演習

5-5_arai_JPNICSecSemi_XssCsrf_CM_ PDF

soturon2013

ハピタス のコピー.pages

Copyright 2008 All Rights Reserved 2

相続支払い対策ポイント

150423HC相続資産圧縮対策のポイント

時間

ブログ制作教材

PowerPoint Presentation

2

Wiki Wiki Wiki...

1

Microsoft Word - PHP_SQLServer2012

tkk0408nari

22 (266) / Web PF-Web Web Web Web / Web Web PF-Web Web Web Web CGI Web Web 1 Web PF-Web Web Perl C CGI A Pipe/Filter Architecture Based Software Gener

初心者にもできるアメブロカスタマイズ新2016.pages

<4D F736F F D A957A A A8FEE95F18F88979D DEC90AC E646F63>

Oracle HTML DBのテンプレート・カスタマイズ

[ ][ ] HTML [ ] HTML HTML

II 2 p.2 2 GET POST form action URL Aisatsu 2.1 Servlet GET GET : Query String QueryStringTest.java 1 import java.io.ioexception; 2 import java.io.pri

Copyright All Rights Reserved. -2 -!

Oracle JDeveloper 10g ADF Creation Date: Jul 07, 2004 Last Update: Jul 08, 2004 Version 1.0

IPA:セキュアなインターネットサーバー構築に関する調査

Microsoft Word - 最終版 バックせどりismマニュアル .docx

情報システム設計論II ユーザインタフェース(1)


情報システム設計論II ユーザインタフェース(1)

LAPP/LAMP (SQL + cgi)

1 ex01.sql ex01.sql ; user_id from (select user_id ;) user_id * select select (3+4)*7, SIN(PI()/2) ; (1) select < > from < > ; :, * user_id user_name

Webデザイン論

untitled


システム分析とデータベース設計

<td width=99%><input type="file" size="80" name="file"></td> <td width=1% nowrap align=right valign=top> 削除キー : </td> <td width=99%><input type="passw

1 SQL Server SQL Oracle SQL SQL* Plus PL/SQL 2 SQL Server SQL Server SQL Oracle SQL SQL*Plus SQL Server GUI 1-1 osql 1-1 Transact- SQL SELECTFROM 058

PowerPoint プレゼンテーション

untitled

untitled

- 2 Copyright (C) All Rights Reserved.

Web データ管理 JavaScript (3) (4 章 ) 2011/12/21( 水 ) 湘南工科大学講義資料 Web データ管理 (2011) 阿倍 1/18

( 前回 ) 提出課題 課題 1( 提出課題 ): データベースからデータを読み込み, そのデータを表示する Web ページ作成してみましょう user テーブルから書籍のデータを一覧表示する. 手順 1:PHP のファイルを user_list.php という名前で作業フォルダに作成する. プログ

FileList Convert a pdf file!


KDDI

pdf

■新聞記事

WEB DB PRESS Vol.1 65

2 Java 35 Java Java HTML/CSS/JavaScript Java Java JSP MySQL Java 9:00 17:30 12:00 13: 項目 日数 時間 習得目標スキル Java 2 15 Web Java Java J

how-to-decide-a-title

インターネットマガジン2003年3月号―INTERNET magazine No.98

untitled

2003年度 情報処理概論

C:\Apache Software Foundation\Apache2.2\htdocs\sample\login.html サンプルプログラム passworddisc.php <head><title> ログイン </title></head> $user=$_post['user']; $

3 CSS について Cascading Style Sheets(CSS カスケーディング スタイル シート カスケード スタイル シート) とは HTML や XML の要素をどのように修飾 ( 表示 ) するかを指示する W3C による仕様の一つ 文書の構造と体裁を分離させるという理念を実現す


健康保険組合のあゆみ_top

リバースマップ原稿2

SVG資料第10回目(その2) Ajaxによる同期通信と非同期通信の違い

教材ドットコムオリジナル教材

IIJ Technical WEEK Cloudbusting Machine(CBM)

情報の構造とデータ処理

untitled

1,.,,,., RDBM, SQL. OSS,, SQL,,.

54 5 PHP Web hellow.php 1:<?php 2: echo "Hellow, PHP!Y=n"; 3:?> echo PHP C 2: printf("hellow, PHP!Y=n"); PHP (php) $ php hellow.php Hellow, PHP! 5.1.2

Copyright 2017 JAPAN POST BANK CO., LTD. All Rights Reserved. 1

オンラインテスト

% 11.1% +6.% 4, % %+12.2% 54,16 6.6% EV7, ,183 Copyright 216 JAPAN POST GROUP. All Rights Reserved. 1

FileMaker 16 ODBC と JDBC ガイド

復習 (SQL 文 ) 3/6 復習 (SQL 文 ) 4/6 表の作成 CREATE TABLE...; 表の削除 DROP TABLE テーブル名 ; 表内のデータが全て消えてしまう. 表内のデータを得る SELECT 列名 FROM 表名...; 表にデータを挿入する. INSERT INTO

P. 2 P. 4 P. 5 P. 6 P. 7 P. 9 P P.11 P.14 P.15 P.16 P.16 P.17 P.19 P.20 P.22 P P P P P P P P P

P. 2 P. 4 P. 5 P. 6 P. 7 P. 9 P.10 P.12 P.13 P.14 P.14 P.15 P.17 P.18 P.20 P P P P P.25 P.27 P.28 Copyright 2016 JAPAN POST BA

データベースS

Gray [6] cross tabulation CUBE, ROLL UP Johnson [7] pivoting SQL 3. SuperSQL SuperSQL SuperSQL SQL [1] [2] SQL SELECT GENERATE <media> <TFE> GENER- AT

,, create table drop table alter table

ISコースプロジェクト実習 前期(第1回 ガイダンス)

日本オラクル株式会社

やよいの顧客管理

弥生給与/やよいの給与計算

弥生 シリーズ

弥生会計 プロフェッショナル/スタンダード/やよいの青色申告

弥生会計/やよいの青色申告

弥生会計 ネットワーク/プロフェッショナル2ユーザー

PowerPoint Presentation


Copyright 2008 NIFTY Corporation All rights reserved. 2

Sinatra と MongoDB 今回は Sinatra で MongoDB の操作を体験してみます 進捗に合わせて ドライバから Ruby で使える便利な ORM の紹介をします

<48746D6C8AEE91628D758DC02E786C73>

Transcription:

PHPMySQL 4 PC LAN

2 () ()

SQLDBMS DBMS DataBase Management System mysql DBMS SQL Structured Query Language SQL DBMS 3

DBMS DataBase Management System B Table 3 Table 2 Table 1 a 1 a 2 a 3 A SQLStructured Query Language Table 1 a 1 a 2 a 3 Table 2 4

PHPmySQL mysql hideki B Table 3 Table 2 A Table 1 a 1 Table 2 a 2 a 3 Table 1 a 1 a 2 a 3 localhost matsui $my_con = mysql_connect($hostname,$yourname,$password) OK A mysql_select_db($db_name,$my_con); mysql_query($query); php mysql_close($my_con) 5

SQL SELECT FROM WHERE CREATE DATABASE DROP DATABASE USE CREATE TABLEDROP TABLE INSERTUPDATEDELETE SELECT FROMWHEREORDER BYGROUP BY JOIN http://www.rfs.jp/sitebuilder/sql/index.html 4SQL 6

MySQL Web MySQLPHP MySQL PHP MySQL 7

Web phpdev 8

9 DOS Mysql localhost root mysql matsui hideki matsui localhost sample_db mysql

sample_db sample_db DB sample_db 10

record 8 id INT AUTO_INCREMENT, id registdata timestamp, registdata sample_db record record 11

12 record 1 name answer1 0 answer2 1 id registdata record id registdata

index.php form.php confirm.php insert.php show.php 13

index.php show.php index.php delete_input.php delete.php 14

operate_db.php <?php // function myopen(){ global $my_con,$hostname; $hostname="localhost"; $yourname="matsui"; $password="hideki"; $db_name="sample_db"; // MYSQL if(!$my_con = mysql_connect($hostname,$yourname,$password)){ print "${hostname} "; exit; } // mysql_select_db($db_name,$my_con); } // function myclose(){ global $my_con,$hostname; if(! @mysql_close($my_con)){ print "${hostname} "; } }?> 15

showf.php <?php // // "operate_db.php" myopen()myclose() function show(){ // $result $result = mysql_query("select * from record ");?> <table border ="1"> <tr><td><b> </b></td><td><b> </b></td><td><b> </b></td><td></b> </b></td><td><b> <?php // while ($row = mysql_fetch_array($result)) {?> </tr> <tr> <td><?= $row["name"]?></td> <td><?= $row["answer1"]?></td> <td><?= $row["answer2"]?></td> <td><?= $row["id"]?></td> <td><?= $row["registdata"]?></td> </tr> <?php } }?> 16

index.php <!-- <tr> --> <!-- show.php <html> --> <head> <form action="show.php" method="post"> <mete http-equiv="content-type" <td> <br> content="text/html;charset=shift_jis"> </td><td><input type="submit" value=" <title> </title> "></td> </head> </form> <body bgcolor="#ffefd5" text="#696969"> </tr> <tr> <h2><br> <!-- delete_input.php --> <form action="delete_input.php" method="post"> <hr> <td> <br> </h2> </td><td><input type="submit" value=" "></td> <!-- --> <!-- form.php--> <form action="form.php" method="post"> <table border="1"> <tr> <td> <br> </td><td><input type="submit" value=" "></td> </form> </tr> </tr> </table> </form> <pre> Copyright (C) 2003 yuzuru soga. All Rights Reserved </pre> </body> </html> 17

form.php <html> <head> <mete http-equiv="content-type" content="text/html;charset=shift_jis"> <title> </title> </head> <body bgcolor="#ffefd5" text="#696969"> <h2> </h2> <hr> <br> <br> <form action="confirm.php" method="post"> <?php /* */ $question=array(" "," "); /* */ for($ans_cnt=0;$ans_cnt<3;$ans_cnt++){ $answer[$ans_cnt]=array(" "," "," ","poor"); } global $question,$answer; function disp(){ global $question,$answer; print ("<p> <br><input type= "text " name= "yourname "></p>"); for($q_num=0;$q_num<2;$q_num++){ print ("<p>$question[$q_num]<br>"); for($i=0;$i<4;$i++){ print("<input type = "radio " name= "$q_num " value= "$i "ckecked>{$answer[0][$i]}"); } } print ("</p>"); print ("<p><input type= "submit " name= "submit " value= " "></p>"); print ("</form>"); } disp();?> </form> <pre> Copyright (C) 2003 yuzuru soga. All Rights Reserved </pre> 18 </body> </html>

confirm.php <table border ="1"> <tr><td> </td><td> </td><td> </td></tr> <html> <tr><td><?php print $name;?></td><td><?php <head> print $answer1;?></td><td><?php print <mete http-equiv="content-type" $answer2;?></td></tr> content="text/html;charset=shift_jis"> </table> <title> </title> <!-- insert.php </head> "name","answer1","answer2" --> <body bgcolor="#ffefd5" text="#696969"> <form action="insert.php" method="post"> <input type="submit" name="submit" value=" "> <h2> </h2> <input type="hidden" name="name" value="<?php <hr> print $name;?>"> <br> <input type="hidden" name="answer1" value="<?php print $answer1;?>"> <br> <input type="hidden" name="answer2" value="<?php print $answer2;?>"> <!-- form.php --> </form><br> <?php $name = $_POST[yourname]; <!-- form.php $answer1 = $_POST[0]; --> $answer2 = $_POST[1]; <form action="form.php" method="post"><input?> type="submit" name="submit" value=" <!-- form.php "></form> MYSQL <pre> --> Copyright (C) 2003 yuzuru soga. All Rights Reserved </pre> 19 </body></html>

insert.php <!-- MYSQL --> //SQL <html> $query = "insert into record(name,answer1,answer2) <head> values( "$name ", "$answer1 ", "$answer2 ")"; <mete http-equiv="content-type" mysql_query($query); content="text/html;charset=shift_jis"> <title> </title> //MYSQLmyclose() </head> "operate_db.php" <body bgcolor="#ffefd5" text="#696969"> myclose(); <h2> <br>?> </h2> <hr> <br><br> <?php <br> //confirm.php $name = $_POST[name]; <!-- index.php $answer1 = $_POST[answer1]; show.php -- $answer2 = $_POST[answer2]; > <form action="index.php" method="post"><input //"operate_db.php" type="submit" name="submit" value=" "></form> include "operate_db.php"; <form action="show.php" method="post"><input type="submit" name="submit" value=" //MYSQL "></form> myopen()"operate_db.php" myopen(); <pre> Copyright (C) 2003 yuzuru soga. All Rights Reserved 20 </pre></body></html>

show.php <html> <head> <mete http-equiv="content-type" content="text/html;charset=shift_jis"> <title> </title> </head> <body bgcolor="#ffefd5" text="#696969"> <h2> </h2> <hr> <?php include "showf.php"; include "operate_db.php"; myopen(); show(); myclose();?> <form action="index.php" method="post"><input type="submit" name="submit" value=""></form> <pre> Copyright (C) 2003 yuzuru soga. All Rights Reserved </pre> </body> </html> 21

delete_input.php <!-- id <!-- id --> <html> <head> <mete http-equiv="content-type" content="text/html;charset=shift_jis"> <title> </title> </head> <body bgcolor="#ffefd5" text="#696969"> <h2> </h2> <hr> delete_id delete.php --> <form action="delete.php" method="post"> <table border ="1"> <tr> <td> <br>( )</td><td><input type="int" name="delete_id" size = "5"></td> </tr> <tr><td></td><td><input type="submit" value=" <?php "></td></tr> //"operate_db.php" "showf.php"</table> </form> include "showf.php"; include "operate_db.php"; <!-- index.php--> //MYSQL myopen()"operate_db.php" myopen(); <form action="index.php" method="post"><input type="submit" name="submit" value=" "></form> // show() "showf.php" show(); //MYSQLmyclose() "operate_db.php" myclose();?> <pre> Copyright (C) 2003 yuzuru soga. All Rights Reserved </pre> </body> </html> 22

delete.php <!-- delete_input.php //SQL --> $query = "delete from record where id = "$id ""; <html> mysql_query($query); <head> <mete http-equiv="content-type" // show() content="text/html;charset=shift_jis"> "showf.php" <title> </title> show(); </head> <body bgcolor="#ffefd5" text="#696969"> //MYSQLmyclose() "operate_db.php" <h2> </h2> myclose(); <hr>?> <form action="index.php" method="post"><input <?php type="submit" name="submit" value=" //"operate_db.php" "showf.php""></form> include "showf.php"; <pre> include "operate_db.php"; Copyright (C) 2003 yuzuru soga. All Rights //MYSQL Reserved myopen()"operate_db.php" myopen(); </pre> //delete_input.php delete_id $id = $_POST[delete_id]; </body> </html> 23

MySQL phpdev http://localhost/phpmyadmin/ mysql GUI 24