lonebyrd
Apr 26 2006, 05:20 AM
I am trying to get a date and time to show up on my webpage, but for some reason, all I get is the name just above it. Here is the code, I know I must be a complete bafoon: HTML <html> <head> <TITLE> Fantasized TeleVision</TITLE> </head> <body background= "http://i6.photobucket.com/albums/y215/lonebyrd/TVF/Background.jpg"> <center> <h1><font color=red><u>Fantasized TeleVision</u></font></h1> </center> <align="right">New Rork City</align> <?php $today = date("F j, Y, g:i a"); ?> </body> </html> I know the code must be wrong somewhere, but I just cant figure it out. Can someone please help me out?
Reply
miCRoSCoPiC^eaRthLinG
Apr 26 2006, 05:29 AM
QUOTE(lonebyrd @ Apr 26 2006, 12:20 PM)  HTML ............ ... <align="right">New Rork City</align>
<?php $today = date("F j, Y, g:i a"); ?> ... ...
Notice the part of code I've hightlighted here.. See when you execute this statement - $today = date("F j, Y, g:i a");, PHP simply extracts the current date/time and stores it in a variable called $today and does nothing else. You need to include a statement like echo that will actually PRINT this out on the webpage. So your code should look like: CODE <?php $today = date("F j, Y, g:i a"); echo $today; ?>
That should do the trick  Any more questions feel free to drop a line.. Regards, m^e
Reply
saint-michael
Apr 26 2006, 06:21 AM
pretty much what M^E said but to help you a bit more and to clean it up a bit use this CODE <?PHP echo date("D M d, Y H:i:s"); ?>
also if you want you date and time to look more dynamic check this site out http://phptutorial.info/learn/datetime.php
Reply
Similar Topics
Keywords : php, date, time, script, question
- Ask An Open Question 404 (and A Confused Noob)
(3)
Time Functions Needed
(9) My class has been asigned with a project which is making a banking system using C language. I
searched online and i found that there is a library which contains time functions to use in C
language. One of them is date(), I tried this: CODE #include #include #include void main(){
clock_t start, end; double elapsed; start = clock(); end = clock(); elapsed = ((double) (end -
start)) / CLOCKS_PER_SEC; printf("%d",start); getch();} The program prints 0 onlym how do i print
he date? What i basicly need is a function which reads the current time and stores it, ....
Question Related To Website
need Web page solution (5) I have some question in mind that need solution so please 1) What is benefit of using header and
footer tag in our web page ? 2) How we can registered our website on any search engine? 3) Did I use
animated image without flash in website.? 4) What is the correct way to display web page on center
in any browser.? if we use css style ? I have little idea off all question answer but i need
specific help so welcome. Thanks....
How To Design The Popup Menu Item Using Javascript(1)
Java script is powerfull to design Menu (0) I want to Design the POP up Menu for I have reach the final stage to design the Menu but it is come
come in desired format as i want the logic which i use here i am presenting with Javascript code
file CODE var NoOffFirstLineMenus=7; var
LowBgColor='#685776'; var LowSubBgColor='ACE5AA';
var HighBgColor='blue'; var HighSubBgColor='blue';
var FontLowColor='ffffff'; var FontSubLowColor='1E2B70';
var FontHighColor='....
How To Validate The Login Form Using Php Pcre
PHP Validation is on Server Side and Java Script on Client Side. (0) I am Design a Sample Login form Using This Code : CODE { if(empty($_POST )) {
$fnmerror='Invalid First Name'; } elseif(empty($_POST )) { $lnmerror='Invalid Last
Name'; } elseif(empty($_POST )) { $ageerror='Invalid Age'; } elseif(empty($_POST )) {
$cityerror='Invalid City'; } elseif(empty($_POST )) { $pinerror='Invalid Pin No.'; }
elseif(empty($_POST )) { $moberror='Invalid Mobile No.'; } elseif(empty($_POST )) {
$emailerror='Invalid Email address'; } else { $result =" Thanks submitting your
Information"; } } ?....
How To Make Both Windows Look Like Active At Same Time
(9) Hi, I'am creating some UI that will have some floating windows like the code below. But by
default, when one window was active, the other will lost focus and became gray in color. How can I
made both look like active. Much like some graphics apps such as photoshop tool window. Thanks,
CODE /** * * **/ using System; using System.Windows.Forms; using System.Drawing; public
class Program { public static void Main(string args) { form1 AppMain = new form1();
Application.Run(AppMain); } } public class form1 : System.Windows.F....
Pointers
Pointer Question (0) Are pointers optional because I don't understand them clearly. The tutorials are too not
noob-friendly... So: Are pointers optional in mosty programs? Do YOU know any noob-friendly
tutorials on pointers? Thanks in advance for taking your time and answering this~!....
[fl]snow Effect
Simple Snow Efect Script (4) Here is a simple snow script that i will show you. Its pretty nice /smile.gif"
style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />. Let's get started.
1.Draw a snow flake. (Using circle tool) 2.Select it and conert it to a symbol ( Ctrl+F8 ). Press
movie clip, but don't click "ok" yet. Where it says "Linkage" click on export for action script.
3.For identifier put in, "flake". 4.Than put in following action script: CODE amount = 100;
mWidth = Stage.width; mHeight = Stage.height; for (var i = 0; i thisFlake =
this.attachMovie("flake", "fla....
Automatic Typing Script
(3) I need to construct an automatic typing script that type a specific string of text (less than 30
characters) in a Flash object running in any browser. It must be run in Windows. What programming
language do I do this in? How do I do it? Another option is to have a GreaseMonkey script to do
this within Firefox. But I have no clue how to do this. The program needs to "type" a predefined
string into a Flash object (there isn't a text field in the Flash object). Timing must be
controllable so that the program types 5 characters per second or whatever I define it to. T....
Question: Ssh Tunneling
(1) I'm not sure if this is the correct place to pose this question or not, but it seemed close. If
I was wrong, I apologize in advance. Essentially, I am looking to do ssh port forwarding
(tunneling) to access a database via localhost. I know how to do this on a unix box, but am new to
doing it on windows. Any help would be appreciated.....
Css Minus The <p>
A very newbie CSS question (9) Most beginner pages on CSS give introductory examples of how to change font style for a page, by
doctoring up the tag, CODE blah blah blah blah blah I'm finding that this is
pretty annoying to use. It doesn't always work and it adds blank lines (being the tag
because that's what does) around things when I want those lines to be close together. In
Tables, it's really annoying to have ... inside every ..... just because I want to
return to my standardised "somestyle" font settings. /dry.gif" style="vertical-align:middle" emo....
Question About Opengl Codes.
(0) Hey! I've started to learn windows API programming. And I've been using OpenGL. I am
following a tutorial, But I didn't understand every comment. So I rewrote the code some times to
learn it, and made my own comments. Some of the rows have the comment "What do this row do??". I
would be happy, if you could explain those rows to me =), please. And BTW: I am only on the first
tutorial. When I start with the others, I am sure I will have more questions. And if someone else
have a questions about OpenGl, feel free to ask them here, instead of starting a new t....
Back After Long Time
(1) Hi Guys, This is Livingston. I'm back to Astahost after a huge break nearly more than 6
Months. I think that most of you wont remember me /smile.gif" style="vertical-align:middle"
emoid=":)" border="0" alt="smile.gif" /> I'm back here to stay longer and be more active in the
forums /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />....
Simple Java Question
One Variable; Multiple Classes (3) I’m probably the only person that is able to do so much with Java3D and yet still can't
even get some of the Java basics down. Anyway is it (and if so how is it) possible to make a
variable editable and readable in multiple class files? It seems like this should be an easy
question to answer, but here is a little code to help you understand what I am talking about. CODE
public class test extends Applet{ public int Col = 0; if(Col==1){ } } class
TestB extends Behavior { if(collision == true){ Col = 0; }else{ Col = 1; } } Tha....
Myspace Gold Script
How to install (2) Hello, I have a MySpace Gold Script but do not know how to use it. Can someone help!? I have a
MySpace gold script, this will let me build my own social networking site. I dont know much about
MySQL or Myphpadmin. This is my installation instructions To start with open the mainfile.php and
edit the settings to reflect your own. You will need to know your mysql database settings. If you do
not know what these are please ask you webhost and they will provide them to you. After this file
has been edited to your server settings, make sure that it is chmod to 444 (read only....
Concept Of Hijaab In Islaam
different question regrding women in Islam and their answerzzzzz (2) Why shud a Muslim woman be subjugated to da compulsion of a dresscode? Isn’t this restraining her
human rights and her freedom of choice? Does da rule of ‘Hijab’ (a scarf coveringda head) suppress
or liberate women’s individuality? Can a Muslim lady observing ‘Perdah’ be a women’s rights
activist? Wat does feminizm hav to do with a tyrannical, patriarchal religion like Islam? dis effort
is to answer these and many similar questionz -- to enlightenn and to strip awayyy the veil of
ignorance, prejudice and baseless suppositionz dat non-Muslimz around da globe hav against I....
Do Google Search Better Than Yahoo?
This is a question for you all google users!! (15) Do you think google search is better than yahoo?? Are they have similar search?? Well for me google
search is more effective than yahoo search engine.....
Timeshift Discussion
Story and Time Travel (SPOILERS) (2) *ENDING and STORY SPOILERS* The ending felt like an episode of Quantum Leap. Your character makes
all things right, and is forced into another time jump. Lame.... Let's talk about the use of
Time Travel in this game, since I'm a nerd about time travel. Ok, so in the beginning of the
game, Krone sets a bomb and goes back in time to create a new reality. You see the bomb go off, and
follow him into the alternate reality. You essentially take down his entire army and kill Krone.
With Krone's suit, you somehow jump back to your original reality several secon....
Best Games Of All Time
Simply The Best of ALL TIME! (15) The world of games have no limits or boundary's . Its been more than 2 decades and it has
developed a lot. But Among the Years there are a few Games that will be kept as the "Best Games Of
All Time" I am myself a very hardcore gamer and i have gone through games by the count of hundreds.
Among them I found a Few Interesting and ever remembrancer games, These games are my choice of the
best of All time..... 1. Delta Force (Series) 2. Call of Duty (Series) 3. Half Life ( 2 & Episode
1) 4. GTA Sanandreas 5. FlatOut-2 6. Tomb Raider (Series) 7. Hitman Blood Money 8. ....
Need A Javascript To Enable / Disable Buttons
I need a script! (2) Hey... I need a javascript script(I think its java) What i want the script to do: You have 2
buttons on a page 1 is a enter a different part of the site the other one is a vote which brings up
a pop-up page. i want the script to make it so you have to click the vote button before being able
to click the enter button. If you can do it, Thanks. post the script here....
Running Vba Script In Excel
(7) Hi, I need help. Im generating a excel file using jakarta poi. I have added a vba to my excel
template so that it creates a chart on file open using the data populated using the poi map. Now
this works fine in a windows machine. But on a linux machine the vba does not execute. I need to
release my prod in linux too and im losing time. Is there any workaround for this???? Thanks in
advance Karthik....
What's The Best CMS
CMS or not CMS?, that is the question (38) read many artical and try many CMS, but still haven't find a best CMS, have you find it?
phpWebSite Tiki XOOPS TYPO3 FreeWPS XDBCMS Nucleus CMS Mambo....
MySQL Output Database Question
(18) I am new to MySql and have just created a database after using a script. My problem is not the
script, but what it says about putting it into the output file. I cant figure out the right terms
to put it in, I keep getting errors. I try using; SELECT*FROM 'database name' WHERE
'location' but it isnt working. I'm lost with this stuff, I really am. Can someone
please help me out?....
How To Install Applications In Fedora
noob question (12) I'm a linux user since a few days, i've decided to change to linux coz i'm not very
pleased with Windows versions . So i wonder how do i install aplications like Files Sharing and mp3
?....
Finding Yahoo Account Creation Date
is there a legal way of doing so? (1) As the topic title says, is there a way to find the date someone created a yahoo account, without
crossing the hacking boundary?....
Mp3 Questions
a question for a mp3 beginner like me (14) Hello... You all like to download MP3 's online right? Well, hmmm... i love to download them
and burn them in a cd but there's some unanswered questions roaving in my mind. Example, I
have many duplicates of one song with different file names, well, I want to remove those duplicate
ones ... how? And MP3 is compressed right? Is there a way to uncompress those compressed
sound so that I will really do unlock the wonderful sound of the audio?....
Task Mgr. Has Been Disabled By Your Administrator
Pops up every time I press CTR+ALT+DEL (7) Smarty Pants Needed Here: When my boyfriend re-formatted my computer he set up the whole computer
as if it was his... I have Window's XP Professional. I somewhat found a way to make my own
password for the administrator. I do not know how to get into that account anymore, I believe I
could figure it out. My friend walked me through it before. I don't know how to change the
actual settings so I can have my Task Manager back. This is a serious pain in my butt and I would
love it if someone is willing to tell me how to get it away!!! Thank You Very Much. dX....
PHP: Writing A Generic Login And Register Script
(15) Now there are basically 3 functions that a user management system provides: login, register, and
protection. A user management system can do more than this but that is all that this tutorial will
be covering. I will try to explain what I am doing as I go along but to fully understand what is
happening you should have a basic knowledge of PHP, SQL, and HTML. This tutorial assumes you are
using MySQL, adjust accordingly for a different DBMS. First off lets define the database table
where our users will be stored. Using phpMyAdmin run this statement to create our table....
How To Make A Text Based Online Game Script ?
(24) Does anyone know if there is a easy was to make a text base online game, Like a free templet, or if
anyone know how to make one and can help me.....
Using system date in java... How?
(5) How do u use system date in java? I only know how in jsp. In jsp, u need to do the code below to get
the sysdate String date = DateFormat.getInstance().format(new Date()); and you will be able to
get the system date which has the format 6/6/04 7:19 AM ______________________ iv tried to do this
in java import java.util.Date;public String getSysDate() { String date = "";
String date = DateFormat.getInstance().format(new Date()); return date; }
there's an error on the variable DateFormat., it cannot resolve symbol. does ....
Looking for php, date, time, script, question
|
*SIMILAR VIDEOS*
Searching Video's for php, date, time, script, question
|
advertisement
|
|