这令我非常困惑......我现在有这样的头痛!我一直在学习PHP一个月,这是我预期在4周前玩弄s的东西:
我收到警告未定义的索引和数据库正在更新日期为0000-00-00,然后在其他列中没有任何内容,我把查询转换为回声,看看发生了什么,但似乎没有得到分配给变量正在从表单发送!
代码:
(简化的)
calender.php
Day:
January
February
March
April
May
June
July
August
September
October
November
December
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
Slots Available:
updatecalender.php//connect to database
require "dbconn.php";
$dayofmonth = $_GET['dayofmonth'];
$month = $_GET['month'];
$year = $_GET['year'];
$noslots = $_GET['noslots'];
$query = INSERT INTO calender VALUES ('".$year."-".$month."-".$dayofmonth."','".$noslots."')";
$results = mysql_query($query)
or die(mysql_error());
header('Location:calender.php');
?>我是一名初学者,所以我不是在努力保证安全......只是让它工作而已!
非常感谢您提供任何建议和帮助!