#!/usr/bin/perl # エラーをブラウザに表示 use CGI::Carp qw(fatalsToBrowser); # DBIモジュール use DBI; # ユーザ名とパスワード $user = 'ユーザ名'; $pass = 'パスワード'; # DBへ接続 $db = DBI->connect('DBI:mysql:DB名:サーバ名', $user, $pass); # 命令 $sth = $db->prepare( "select * from LOGIN" ); # 実行 $sth->execute; # 出力 print "Content-type: text/html\n\n"; while( @row = $sth->fetchrow_array ){ print "@row\n"; } $db->disconnect; exit;
DB接続を利用して、よくあるログイン画面を作ってみます。 *DBはMySQLを使用します。 DBへの接続に関しては前回のDBに接続を参考にしてください。 プログラムの構想としてはこんな感じで作ってみようと思います。 以降、GETやらPOSTというデータ送信方法の呼称が出てきますので灰色の部分がその説明です。 *GETはデータをURLの後ろにくっつけて送信します。(例:http://~.com/login.cgi?name=a-bs&pass=test) *これはログイン画面などパスワードなどの個人情報を扱う場合とても危険です。(URLでばれる上に、上記のアドレスを打ち込めば認証画面なしでページに移動するからです。) *そこで考えられたのがPOST方式でこれはURLにくっつけて送信はせず、送る側でデータを"POSTで~のデータを送りますよ"といったような記述をします。 *です
[an error occurred while processing this directive][an error occurred while processing this directive][an error occurred while processing this directive][an error occurred while processing this directive]ホームサポートTechNote[an error occurred while processing this directive][an error occurred while processing this directive][an error occurred while processing this directive]CGI を使用してデータ送信する方法 Issue (問題
概要 書家の青柳衡山先生が揮毫及び作成されたフォントです。 登録文字数は約13,000字です。(Windows TrueTypeフォントの場合) 無料でご利用できます。 著作権放棄で完全フリーです。 改編も自由です。 使用についての制限はありません。 無保証です。お客様の責任でご利用ください。 雑誌・書籍への掲載・CD収録も自由です。見本誌をお送りいただけるようでしたら下記 青二書道教室 青柳様へお願いいたします。 対応OS Windows TrueTypeフォント Windows 95/98/Me/NT4.0/2000/XP/Vista で使用できます。 OpenTypeフォント Mac OS X 10.1以降でしたらそのまま使用できます。Mac OS 8.1 〜 9.xはATM4.6以降が必要です。 Windows 2000/XP/Vista でしたらそのまま使用できます。Window
Winning by Being Valuable It's a challenge to come up with high ROI trade show booth design ideas that work well. And custom made stands in particular, present even more complexity, due to their size. But there is a popular and cost-effective option you can use to make your stand be noticeable. How could the core competences of a industry leader be seen when the quality of its products is, by natu
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く