昨天忘記把資料庫的建立發上來了^現在補上
create database gbook;
create table `gbook` (
`id` int( 255 ) unsigned not null auto_increment primary key ,
`name` varchar( 10 ) not null ,
`***` tinyint( 1 ) unsigned not null ,
`email` varchar( 255 ) not null ,
`info` text not null ,
`ip` varchar( 15 ) not null ,
`time_at` datetime not null
)主要頁面有:
input.html
insert.php
show.php
$conn = mysql_connect($mysql_server_name,$mysql_username,$mysql_password);
mysql_select_db($mysql_database,$conn);
$result = mysql_query($sql);
while($row = mysql_fetch_row($result))
else
?>
<?=$row[6]?> <?=$row[5]?>
<?=$row[1]?>(<?=$gender?>) <?=$row[3]?>
<?=nl2br($row[4])?>">[修改]
">[刪除]
<?
}mysql_free_result($result);
?>
change.php
<?
$mysql_server_name = "localhost";
$mysql_username = "root";
$mysql_password = "123456";
$mysql_database = "gbook";
$sql = "select name, ***, email, info from gbook where id = '$id' ";
$conn = mysql_connect($mysql_server_name,$mysql_username,$mysql_password);
mysql_select_db($mysql_database,$conn);
$result = mysql_query($sql);
$row = mysql_fetch_row($result);
?>
del.php
<?
$mysql_server_name = "localhost";
$mysql_username = "root";
$mysql_password = "123456";
$mysql_database = "gbook";
$sql = "delete from gbook where id = '$id' ";
$conn = mysql_connect($mysql_server_name,$mysql_username,$mysql_password);
mysql_select_db($mysql_database,$conn);
$result = mysql_query($sql);
mysql_close($conn);
?>
[返回]
change_ok.php
<?
$mysql_server_name = "localhost";
$mysql_username = "root";
$mysql_password = "123456";
$mysql_database = "gbook";
$sql = "update `gbook` set `name` = '$name',`***` = '$***',`email` = '$email',`info` = '$info' where `id` ='$id' ";
$conn = mysql_connect($mysql_server_name,$mysql_username,$mysql_password);
mysql_select_db($mysql_database,$conn);
$result = mysql_query($sql);
mysql_close($conn);
?>
[返回]
自己用JS寫了乙個簡單的時間控制項。。。
繪畫時間選擇器 var timeselect topattr top leftright center r bottom button 繪畫時間選擇器開始 timeselect.window function obj timeselect.obj obj var time new date var ...
用php mysql乙個名片庫程式
用php mysql 乙個名片庫程式,有分類查詢,分頁功能。第一步 按下列代表先做個靜態頁面。第二步 如下建庫。id int 4 否 auto increment http varchar 25 否 name varchar 50 否 email varchar 50 否 gs varchar 20...
用java寫了乙個漢諾塔
package com.brzhang 漢諾塔 開始盤子全部都放在第一根柱子上 目的 將第一根柱子上的盤子全部移動到第三根柱子上,規則是不能編號較大的盤子放在編號交小的盤子上面。public class hanota else 移動盤子,從from移動到to借助assite param from p...