一个用PHP和MYSQL写的定饭系统_PHP
时间:2021-07-01 10:21:17
帮助过:36人阅读
前台html
定饭
vlink="#3366CC" alink="#FF9900">
//后台php eat.php
$conn = odbc_connect("blue", "root", "");
$datetime=date("h:i A l")."_".date("F dS, Y");
$query ="insert into eat ( name,eat,zs,uptime) values ('$name','$eat','$zs','$datetime')";
odbc_do($conn, $query);
echo "成功发送!";
$query = "select * ";
$query .= "from eat";
odbc_result_all( odbc_do($conn, $query), "border=1");
odbc_close($conn);
?>
//mysql表结构
CREATE TABLE eat(
name char(40),
eat char(40) ,
zs char(40) ,
datetime char(40)
);