473,405 Members | 2,444 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Where Does Date Code Go 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:www.manchesterpaul.net/world.war.html
http:www.manchesterpaul.net/world.govroy.html

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 circumstances 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");
Jul 19 '05 #1
4 2513
Stupidgirl wrote:
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.


Try this. And only this in a webpage:

<?php
echo "Hello world!";
?>

If that prints out the word "echo" or it doesn't print out

Hello world!

your php isn't working correctly and you need to fix that before trying
to do anything else with it.

I think it is broken because you said that it prints out text like this:

echo("The Time Is $now");

Jul 19 '05 #2
Stupidgirl wrote:
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.


Try this. And only this in a webpage:

<?php
echo "Hello world!";
?>

If that prints out the word "echo" or it doesn't print out

Hello world!

your php isn't working correctly and you need to fix that before trying
to do anything else with it.

I think it is broken because you said that it prints out text like this:

echo("The Time Is $now");

Jul 19 '05 #3
Aggro <sp**********@yahoo.com> wrote in message news:<YN************@read3.inet.fi>...

Try this. And only this in a webpage:

<?php
echo "Hello world!";
?>

If that prints out the word "echo" or it doesn't print out

Hello world!

your php isn't working correctly and you need to fix that before trying
to do anything else with it.

I think it is broken because you said that it prints out text like this:

echo("The Time Is $now");

Problem solved, like my 'master', i am new to all this. He pointed out
that i needed seperate <?php & ?> brackets for each 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.
Jul 19 '05 #4
Aggro <sp**********@yahoo.com> wrote in message news:<YN************@read3.inet.fi>...

Try this. And only this in a webpage:

<?php
echo "Hello world!";
?>

If that prints out the word "echo" or it doesn't print out

Hello world!

your php isn't working correctly and you need to fix that before trying
to do anything else with it.

I think it is broken because you said that it prints out text like this:

echo("The Time Is $now");

Problem solved, like my 'master', i am new to all this. He pointed out
that i needed seperate <?php & ?> brackets for each 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.
Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Stupidgirl | last post by:
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...
2
by: Paul Beckett | last post by:
I have successfully used strtotime to format the date on a webpage that is pulled form a MySQL database in the form yyyy-mm-dd. However, in another part of the webpage, I have to insert another...
0
by: Stupidgirl | last post by:
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...
1
by: James Radke | last post by:
Hello! I have a webpage (vb.net developed in Visual Studio.NET 2003) which has a repeater control which has as one of its columns an editable textbox. This textbox allows the user to enter a...
5
by: Martin Eyles | last post by:
Hi, I am trying to extract a date from a database, and display it in yyyy-mm-dd hh:mm:ss format on an ASP.NET webpage. I have been using the CStr function to turn this into text, but this doesn't...
9
by: abctech | last post by:
Helo, I have a calendar on my webpage on which the date format is 'DD-MM-YYYY'; user selects a date and it has to be stored in the same format in the backend; but I checked in MySQL there is...
3
by: mantrid | last post by:
Hello I have date and time in my mysql table in the form 2007-05-03 00:00:00 which I have dispayed on my webpage using echo $selldatetime I want to know how I can display it in the form...
5
by: wreed06 | last post by:
I have 2 problems. In my webpage, I have a dropdown list with a button that takes the user to a popup window specific to the option. I am using Firefox 2.0.0.13. I have successfully validated my HTML...
2
by: haft | last post by:
My webpage of discussion contains a javascript powered image gallery of small thumbnail images that when moused-over, display a larger image that corresponds to the current moused-over thumbnail....
0
by: micarl | last post by:
I'm trying to two two things through Access to Outlook based on a query and selections made on a form. Firstly, i'd like to create an email based on the selections made on a form. Secondly...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.