2006/5/30 学籍番号 名前 |
| <?php $DBSERVER="localhost"; $DBUSER="root"; $DBPASSWORD="root"; $DBNAME=" "; |
|
| $con=mysql_connect($DBSERVER, $DBUSER, $DBPASSWORD); $sel=mysql_select_db($DBNAME, $con); |
AMySQLに接続 B使うDBを選択 |
| $sql= ; $rst=mysql_query($sql, $con); |
CSQL文を作成 DそのSQL文を実行 |
| $m= ; while($row=mysql_fetch_array($rst)){ } $m.= ; |
E結果を加工 |
| mysql_free_result($rst); $cls=mysql_close($con); ?> |
FMySQLと接続断 |
| <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS"> <title>PHP/MySQL連携</title> </head> <body> <?php print $m; ?> </body> </html> |
Ghtml文 |
| Eの説明補足 表seiseki |
while文のところ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
→→ |
|