~~~If this is not today's date, refresh page for updated version. I have tried placing the above AND the MySQL, PHP versions detailed below, on the PHP outputted webpages, above and below the PHP sections. Also, within the Database Fields, as an entry. In the same way that one uses HTML code in the displayed results from a PHP query. Instead of the date and time i get lots of similar output to the bit below, ####### Today's Date Is Today's Date Is Today's Date Is echo("Today Is $today"); echo("The Time Is $now"); ####### Can someone enlighten me as to where the code should be placed. Under no circumstances do i wish to use Javascript. The following are my failures; Today's Date Is Today's Date Is echo("Today Is $today");
echo("The Time Is $now"); [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => <30d56be7.0311151122.1130495c@posting.google.com> [ref] => [htmlstate] => on_nl2br [postusername] => Stupidgirl [ip] => webmistress@man [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 1 [islastshown] => [isfirstshown] => 1 [attachments] => [allattachments] => ) --> Where Do I Place Date Code for Webpage Display - PHP Development
Professional Web Applications Themes

Where Do I Place Date Code for Webpage Display - PHP Development

Hi, i have had no problem displaying the current date and time, on a static webpage. However, when i try to use the various PHP and MySQL snippets, it does'nt seem to work out. My success story can be seen on, amongst others, http:[url]www.manchesterpaul.net/world.war.html[/url] http:[url]www.manchesterpaul.net/world.govroy.html[/url] For this i used the Server Side Includes code of <!--#echo var="DATE_GMT" -->~~~If this is not today's date, refresh page for updated version. I have tried placing the above AND the MySQL, PHP versions detailed below, on the PHP outputted webpages, above and below the PHP sections. Also, within the Database Fields, as an entry. ...

  1. #1

    Default Where Do I Place Date Code for Webpage Display

    Hi, i have had no problem displaying the current date and time, on a
    static webpage. However, when i try to use the various PHP and MySQL
    snippets, it does'nt seem to work out.

    My success story can be seen on, amongst others,
    http:[url]www.manchesterpaul.net/world.war.html[/url]
    http:[url]www.manchesterpaul.net/world.govroy.html[/url]

    For this i used the Server Side Includes code of
    <!--#echo var="DATE_GMT" -->~~~If this is not today's date, refresh
    page for updated version.

    I have tried placing the above AND the MySQL, PHP versions detailed
    below, on the PHP outputted webpages, above and below the PHP
    sections. Also, within the Database Fields, as an entry. In the same
    way that one uses HTML code in the displayed results from a PHP query.
    Instead of the date and time i get lots of similar output to the bit
    below,
    #######
    Today's Date Is

    Today's Date Is Today's Date Is echo("Today Is $today");
    echo("The Time Is $now");
    #######
    Can someone enlighten me as to where the code should be placed. Under
    no cirstances do i wish to use Javascript.
    The following are my failures;

    Today's Date Is <?php echo gmdate("D M d Y"); ?>

    Today's Date Is <?php
    $today =date("l, d, F, Y");
    $now = date("H:i:s");<br>
    echo("Today Is $today");<br>
    echo("The Time Is $now");
    Stupidgirl Guest

  2. #2

    Default Re: Where Do I Place Date Code for Webpage Display

    [email]webmistressmanchesterpaul.net[/email] (Stupidgirl) wrote in message
    news:<30d56be7.0311151122.1130495cposting.google. com>...
    >
    > Hi, i have had no problem displaying the current date and time, on a
    > static webpage. However, when i try to use the various PHP and MySQL
    > snippets, it does'nt seem to work out.
    First of all, are you sure you server even supports PHP and MySQL?
    If it does, does your script file have the *.php extension?
    > The following are my failures;
    >
    > Today's Date Is <?php echo gmdate("D M d Y"); ?>
    This must work if PHP is supported...

    Cheers,
    NC
    Nikolai Chuvakhin Guest

  3. #3

    Default Re: Where Do I Place Date Code for Webpage Display

    [email]nciname.com[/email] (Nikolai Chuvakhin) wrote in message news:<32d7a63c.0311151808.5140f68bposting.google. com>...
    > > The following are my failures;
    > >
    > > Today's Date Is <?php echo gmdate("D M d Y"); ?>
    >
    > This must work if PHP is supported...
    >
    > Cheers,
    > NC
    Problem solved, like my 'master', i am new to all this. He pointed out
    that i should try separate <?php & ?> brackets for each piece of code
    on the page. I had only included the one pair. Presuming that all code
    within it would be processed. Thanks anyway. It seems to be doing the
    job.
    Stupidgirl Guest

  4. #4

    Default Re: Where Do I Place Date Code for Webpage Display

    I noticed that Message-ID:
    <30d56be7.0311180959.2c9b2605posting.google.com > from Stupidgirl
    contained the following:
    >Problem solved, like my 'master', i am new to all this. He pointed out
    >that i should try separate <?php & ?> brackets for each piece of code
    >on the page. I had only included the one pair. Presuming that all code
    >within it would be processed.
    Well it will, as long as the only thing within the tag is code. One of
    the really cool things is that you can make non code, conditional.

    <?php
    if(condition){
    ?>

    Some html that shows if condition is true

    <?php }
    else{ ?>

    Some html that only shows if the condition is false

    <?php } ?>
    --
    Geoff Berrow (put thecat out to email)
    It's only Usenet, no one dies.
    My opinions, not the committee's, mine.
    Simple RFDs [url]http://www.ckdog.co.uk/rfdmaker/[/url]
    Geoff Berrow Guest

Similar Threads

  1. Question How to display diacritics in a webpage generated by a cgi script
    By Luitzen in forum Brainstorming Area
    Replies: 0
    Last Post: April 7th, 09:56 AM
  2. Where to place param in SWFObject code
    By stevenicel in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 1
    Last Post: June 24th, 09:11 AM
  3. Webpage that will return a specific status code?
    By DaveWeil in forum Macromedia Dynamic HTML
    Replies: 0
    Last Post: February 1st, 07:04 PM
  4. Display Windows Login ID on Webpage
    By dolphusp in forum ASP.NET Security
    Replies: 2
    Last Post: March 30th, 03:36 PM
  5. How do I portect my webpage source code?
    By A. Help in forum Macromedia Dreamweaver
    Replies: 12
    Last Post: July 11th, 05:13 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139