Jump to content
Larry Ullman's Book Forums

surfmad74

Members
  • Content Count

    8
  • Joined

  • Last visited

Community Reputation

0 Neutral

About surfmad74

  • Rank
    Newbie
  1. So if I add to the php.ini file the other timezones that should work? Like so? date.timezone = "Europe/London" date.timezone = "America/New_York" etc
  2. In the database the date is stored like so... posted_on 2012-04-18 18:29:15 Below is the code from the page 'forum.php' <?php # Script 15.4 - forum.php // This page shows the threads in a forum. include ('includes/header.html'); // Retrieve all the messages in this forum... // If the user is logged in and has chosen a time zone, // use that to convert the dates and times: if (isset($_SESSION['user_tz'])) { $first = "CONVERT_TZ(p.posted_on, 'UTC', '{$_SESSION['user_tz']}')"; $last = "CONVERT_TZ(p.posted_on, 'UTC', '{$_SESSION['user_tz']}')"; } else { $first = 'p.posted_on'; $last =
  3. HartleySan.... that worked! I received Fri, 20 Apr 2012 13:43:06 +0100Array ( [seconds] => 6 [minutes] => 43 [hours] => 13 [mday] => 20 [wday] => 5 [mon] => 4 [year] => 2012 [yday] => 110 [weekday] => Friday [month] => April [0] => 1334925786 ) So what can II try next? thanks for your help!!!
  4. Hi I've created the Message Board site as per the book but for some reason the Date & Time on both the Forum.php and read.php page aren't displaying. I've tried the supplied code as well as my own and neither work so I'm assuming it might be a php setting or MySQL setting? I've run the site using XAMPP on my MacOSX and also on my rented server. I don't know if it makes any difference but the php.ini file timezone is set to... date.timezone = "Europe/London" Can you help please, many thanks Grant
  5. I'm not too sure what edition it is but it was published December 2007 so I guess maybe its the third edition? Shall I repost?
  6. Hi I've created the Message Board site as per the book but for some reason the Date & Time on both the Forum.php and read.php page aren't displaying. I've tried the supplied code as well as my own and neither work so I'm assuming it might be a php setting or MySQL setting? I've run the site using XAMPP on my MacOSX and also on my rented server. I don't know if it makes any difference but the php.ini file timezone is set to... date.timezone = "Europe/London" Can you help please, many thanks Grant
  7. Hi I fixed the problem and your right. It wasn't a space as such causing the problem, I included a comment on mysqli_connect.php before the opening <?php tag as soon as I removed it the page worked. thanks for your help!
  8. I'm working through Larry's PhP 6 and MySqL 5 book which so far has been excellent but I've hit a snag I can't get past. On Chapter 11 'Cookies & Sessions' I've completed page 327 - 339 and when I test my pages on my MacOSX running Xampp I get errors shown below. Warning: Cannot modify header information - headers already sent by (output started at /Applications/XAMPP/xamppfiles/htdocs/php/mysqli_connect.php:4) in /Applications/XAMPP/xamppfiles/htdocs/php/ch11/login.php on line 23 Warning: Cannot modify header information - headers already sent by (output started at /Applic
×
×
  • Create New...