SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile Build your website the right way

    I have just absorbed most of Ian Lloyd's book. It is great - educational & lively - and it helped me to build my first website. The thing I like about it is the way it makes everything logical and easy to understand.

    I have some questions ( I don't know if Ian sees these...)

    1) The title says HTML and then in the preface he says he'll be '...teaching the latest version of HTML, which is called XHTML'. However both terms are then used throughout the book and my gut feeling is that when Ian says he is using XHTML that is a euphemism for well structured HTML. Any comment?

    2) I'd like to display a current date on my website. Should I use code in the HTML to do that (which seems to use lots of lines) or should I learn about SSI with PHP (which seems to use one or two lines)? My opinions were formed after searching the Web for possible code. Any comments?

    Thanks

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,333
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    1) most likely

    2) why bother? surfers are going to come to your web site if they don't know what day it is?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    1) XHTML is nothing to do with HTML other than the fact it's a reformulation of HTML 4 in XML. I assume what he means in layman's terms he's treating XHTML 1.0 syntax as if it were HTML 4.01 - XHTML is not a new/latest version of HTML 4.x.

    2) PHP or another server-side technology HTML cannot do it alone.

  4. #4
    SitePoint Wizard silver trophybronze trophy Nadia P's Avatar
    Join Date
    Oct 2004
    Location
    NSW Australia
    Posts
    3,564
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    2. Why bother ;-)

    I'm sure if someone needs to know the time (in their time zone too), there's always their own computer clock or a clock nearby ;-)

    Nadia

  5. #5
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1) You should ask for a refund! Anyone who thinks XHTML is 'the latest version of HTML' should not be writing books. At least not about HTML or XHTML.
    Birnam wood is come to Dunsinane

  6. #6
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Off Topic:

    That means Mr T. we will have to start the axe sharpening on the grinding stone you put lit slightly blunter than I. I too were also surprised when one read the sample chapter a while back.

    Perhaps it will get added to the errata.

  7. #7
    SitePoint Zealot
    Join Date
    Jan 2004
    Location
    Temecula, CA
    Posts
    188
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't let the smart replies throw you off your goal. If you need to base the content of your site on the date use PHP. Of course your visitors can determine the date and time on their own, and showing it to them will only look like your saying "Hey, I can tell what the date and time are!" A great way to look really amature.

    On the other hand, if you need to adjust some content based on the date, or the time (morning, noon, sunset, and nighttime background image changes, or current news), then use PHP.

  8. #8
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your help everyone...looks like I'll be learning PHP sometime soon then!

    Cheers

  9. #9
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    just use this:

    Code:
    <?php
     echo date('l jS F, Y');
     ?>
    see http://www.php.net/date to change the format of the date.

  10. #10
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks I'll give it a go...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •