| | |
What's the code of making the day and date automatically updated
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Dec 2006
Posts: 20
Reputation:
Solved Threads: 0
I have made the code of php to Dreamweaver. that codes are containing of date and day. But Seems Dreamweaver can't identify the code of php...
This is my php code that I put into Dreamweaver:
<? print(Date("l F d, Y")); ?>
Anyone knows what is the code of making date and day automatically updated in php?
PS: I click Insert -> Date (and choose the date and day) but it didn't work.
Please help me soon.
Thanks
This is my php code that I put into Dreamweaver:
<? print(Date("l F d, Y")); ?>
Anyone knows what is the code of making date and day automatically updated in php?
PS: I click Insert -> Date (and choose the date and day) but it didn't work.
Please help me soon.
Thanks
•
•
Join Date: Jan 2008
Posts: 74
Reputation:
Solved Threads: 5
First of all your code works just fine. The day and time will change when the server it's on day/time changes.
Secondly, I recommend inserting php after the <?
As far as dreamweaver is concerned, I don't know I don't use it. Sorry I cannot help you there.
Secondly, I recommend inserting php after the <?
PHP Syntax (Toggle Plain Text)
<?php print(Date("l F d, Y")); ?>
•
•
Join Date: May 2008
Posts: 247
Reputation:
Solved Threads: 19
Dreamweaver can be a bit touchy about some PHP code, The method I use is:
As you can see I have added things like 'the' and some spaces so the full date will look like this:

And you could add in a refresh tag if you wanted it to stay updated properly.
The insert date function in Dreamweaver just inserts the date at the time you enter it not dynamically.
You could do what hivenk sugests and write some AJAX or Javascript but that would display the clients date where as the date() command will always show the server date so you can make sure it is always correct.
Regards,
Sam Rudge
PHP Syntax (Toggle Plain Text)
<?PHP $Date = date(l); $Date .= " the "; $Date .= date(dS); $Date .= " of "; $Date .= date(F); $Date .= " "; $Date .= date(Y); print($Date); ?>
And you could add in a refresh tag if you wanted it to stay updated properly.
The insert date function in Dreamweaver just inserts the date at the time you enter it not dynamically.
You could do what hivenk sugests and write some AJAX or Javascript but that would display the clients date where as the date() command will always show the server date so you can make sure it is always correct.
Regards,
Sam Rudge
![]() |
Similar Threads
- memory management in wndows 2000 (Windows NT / 2000 / XP)
Other Threads in the PHP Forum
- Previous Thread: PHP / Flash Variable Email Script Format Question
- Next Thread: Huge Savings
| Thread Tools | Search this Thread |
advanced apache api array basics beginner binary broken cakephp check checkbox class cms code codingproblem combobox cookies cron curl database date datepart display dynamic echo email error file files folder form forms function functions google head href htaccess html image include includingmysecondfileinthechain insert ip javascript job joomla js limit link login mail menu mlm mobile multiple mysql oop outofmemmory paging parse password paypal pdf php problem procedure query radio random recursion remote script search server sessions smarty sms soap source space sql stored syntax system table traffic tutorial unicode up-to-date update upload url validator variable video web webapplications xml youtube





