Levian
03-19-2009, 01:18 PM
I'm trying to make a guestbook :( and I get these error messages:
Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /uia/ravn/u2/cshunn05/project_html/guestbook2/addguestbook.php on line 12
Notice: Undefined variable: name in /uia/ravn/u2/cshunn05/project_html/guestbook2/addguestbook.php on line 15
Notice: Undefined variable: email in /uia/ravn/u2/cshunn05/project_html/guestbook2/addguestbook.php on line 15
Notice: Undefined variable: comment in /uia/ravn/u2/cshunn05/project_html/guestbook2/addguestbook.php on line 15
and this is the relevant part of the code I guess, first line is line 12 and last is 15:
$datetime=date("y-m-d h:i:s"); //date time
$sql="INSERT INTO $tbl_name(name, email, comment, datetime)VALUES('$name', '$email', '$comment', '$datetime')";
$result=mysql_query($sql);
If you need more information to solve this just tell me and I'll provide it. I just don't know what information is relevant and not relevant.
I'm using this page to help me and all code is from there:
Creating a simple PHP guestbook (http://www.phpeasystep.com/workshopview.php?id=15)
and here's the link to my guestbook:
http://prosjekt.hia.no/users/cshunn05/guestbook2/guestbook.php
Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /uia/ravn/u2/cshunn05/project_html/guestbook2/addguestbook.php on line 12
Notice: Undefined variable: name in /uia/ravn/u2/cshunn05/project_html/guestbook2/addguestbook.php on line 15
Notice: Undefined variable: email in /uia/ravn/u2/cshunn05/project_html/guestbook2/addguestbook.php on line 15
Notice: Undefined variable: comment in /uia/ravn/u2/cshunn05/project_html/guestbook2/addguestbook.php on line 15
and this is the relevant part of the code I guess, first line is line 12 and last is 15:
$datetime=date("y-m-d h:i:s"); //date time
$sql="INSERT INTO $tbl_name(name, email, comment, datetime)VALUES('$name', '$email', '$comment', '$datetime')";
$result=mysql_query($sql);
If you need more information to solve this just tell me and I'll provide it. I just don't know what information is relevant and not relevant.
I'm using this page to help me and all code is from there:
Creating a simple PHP guestbook (http://www.phpeasystep.com/workshopview.php?id=15)
and here's the link to my guestbook:
http://prosjekt.hia.no/users/cshunn05/guestbook2/guestbook.php