1、表单(submit)
isset($_POST['select'])//判断是否提交
2、sql语句
where 条件
update
insert into tablename(……) values(……)
3、mysql函数
1>$con=mysql_connect("localhost","root","")
2>mysql_select_db("数据库名",$conn)
3>$result=mysql_query($sql,$conn)
4、mysql_fetch_row($result)//读取的是索引数组
mysql_fetch_assoc($result)关联数组
$rows=mysql_fetch_array($result)索引和关联
5、mysql_num_rows($result)//获取结果集中的记录数
$rows=mysql_affected_rows($result)获取操作索影响的行数
6、 mysql_close($con);