Need Help With Simple PHP Script

Hi all, not sure if I’m posting in the right section, I just started going through ‘Build Your Own Database Driven Website Using PHP & MySQL’ by Kevin Yank.

I’m only in Chapter One and am having a small problem with the first PHP script (Date/Time). I’ll post some attachments to show you, hopefully it will help. It’s probably something that I haven’t done.

Any help appreciated, thanks.

Al.

It looks like you typed a ‘1’ (one) instead of ‘l’ (lowercase L). For more information about the date parameter string, see here

Really thought that was a ‘1’ not an L. Thanks for that. That sorts out the Day, could you tell me how I can fix the Warning?

Certainly, I missed your first attachment, so my apologies. But it is asking you to add this line of code:

date_default_timezone_set('your time zone here');

source | [url=http://us3.php.net/manual/en/timezones.php]Find your Time Zone

So the code you would end up with is:

<?php
date_default_timezone_set('your time zone here');
echo date('l, F dS Y.');
?>

Excellent, thank you. :slight_smile: