Webmaster Forum

Lionsanime Directory   1,000 Directory Submissions   V7N Directory
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Reply
 
LinkBack Thread Tools Display Modes
Old 03-05-2004, 02:25 AM   #1 (permalink)
Contributing Member
 
Join Date: 12-03-03
Location: Dallas, Texas
Posts: 154
iTrader: 0 / 0%
Latest Blog:
None

POR-15 Depot is a jewel in the roughPOR-15 Depot is a jewel in the roughPOR-15 Depot is a jewel in the roughPOR-15 Depot is a jewel in the roughPOR-15 Depot is a jewel in the roughPOR-15 Depot is a jewel in the rough
Send a message via ICQ to POR-15 Depot Send a message via Yahoo to POR-15 Depot
Need simple PHP date output..

I want to put a line of code in one of my php pages that shows a date
2 days ahead.. Such as


<Current date is 3-5-2004 >

Sale Price Expires 3-7-2004

What is the code to do this ?

Apache/PHP4 etc etc

Thanks
__________________
Dave
POR-15 Depot
POR-15 Depot is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 03-05-2004, 05:41 AM   #2 (permalink)
Inactive
 
Join Date: 01-12-04
Posts: 999
iTrader: 0 / 0%
Latest Blog:
None

Emancipator is a jewel in the roughEmancipator is a jewel in the roughEmancipator is a jewel in the roughEmancipator is a jewel in the roughEmancipator is a jewel in the roughEmancipator is a jewel in the rough
Send a message via MSN to Emancipator
So you want it to take todays date, add 2 days to it and output it?
Emancipator is offline  
Add Post to del.icio.us
Reply With Quote
Old 03-05-2004, 11:07 AM   #3 (permalink)
Contributing Member
 
Join Date: 12-03-03
Location: Dallas, Texas
Posts: 154
iTrader: 0 / 0%
Latest Blog:
None

POR-15 Depot is a jewel in the roughPOR-15 Depot is a jewel in the roughPOR-15 Depot is a jewel in the roughPOR-15 Depot is a jewel in the roughPOR-15 Depot is a jewel in the roughPOR-15 Depot is a jewel in the rough
Send a message via ICQ to POR-15 Depot Send a message via Yahoo to POR-15 Depot
Yes
__________________
Dave
POR-15 Depot
POR-15 Depot is offline  
Add Post to del.icio.us
Reply With Quote
Old 03-05-2004, 11:43 AM   #4 (permalink)
Inactive
 
Join Date: 02-04-04
Posts: 14
iTrader: 0 / 0%
Latest Blog:
None

bob9999 is liked by many
Re: Need simple PHP date output..

Hi Rustbullet,

This code should do what you want {Tested but not opitimzed}:

$later =mktime (0,0,0,date ("m" ) , date ("d" )+ 2 ,date ("Y" ));

$later = date ("m-d-y" , $later);

echo "$later";

See <www.php.net/manual/en/function.date.php> for all your date formatting options.

I hope this helps,

Bob
Quote:
Originally Posted by Rustbullet
I want to put a line of code in one of my php pages that shows a date
2 days ahead.. Such as


<Current date is 3-5-2004 >

Sale Price Expires 3-7-2004

What is the code to do this ?

Apache/PHP4 etc etc

Thanks
bob9999 is offline  
Add Post to del.icio.us
Reply With Quote
Old 03-05-2004, 11:55 AM   #5 (permalink)
Contributing Member
 
Join Date: 12-03-03
Location: Dallas, Texas
Posts: 154
iTrader: 0 / 0%
Latest Blog:
None

POR-15 Depot is a jewel in the roughPOR-15 Depot is a jewel in the roughPOR-15 Depot is a jewel in the roughPOR-15 Depot is a jewel in the roughPOR-15 Depot is a jewel in the roughPOR-15 Depot is a jewel in the rough
Send a message via ICQ to POR-15 Depot Send a message via Yahoo to POR-15 Depot
Ok, this isn't going to be as easy as I thought. I'm not a coder.. I just try and fail 20-30 times till I get it right... Here is the line of code were it needs to be inserted..

if ($new_price = tep_get_products_special_price($product_info_value s['products_id'])) {
$products_price = '<s>' . $currencies->display_price($product_info_values['products_price'], tep_get_tax_rate($product_
info_values['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, t
ep_get_tax_rate($product_info_values['products_tax_class_id'])) . '</span>';

From this page

http://www.itkillsrust.com/product_i...roducts_id/232


Suggestions on how to put the "Date" under the price in Red ?

Thanks
Dave
__________________
Dave
POR-15 Depot
POR-15 Depot is offline  
Add Post to del.icio.us
Reply With Quote
Old 03-05-2004, 12:45 PM   #6 (permalink)
Inactive
 
Join Date: 02-04-04
Posts: 14
iTrader: 0 / 0%
Latest Blog:
None

bob9999 is liked by many
Hi Dave,

Your question is too dangerous to answer (at least for me) .

This looks like a production server & I wouldn't want to make a mess of it based on a post of a snippet of the source code.

Maybe you can setup a test page & play around using the date code in that.

Good Luck,

Bob



Quote:
Originally Posted by Rustbullet
Ok, this isn't going to be as easy as I thought. I'm not a coder.. I just try and fail 20-30 times till I get it right... Here is the line of code were it needs to be inserted..

<SNIP>

Suggestions on how to put the "Date" under the price in Red ?

Thanks
Dave
bob9999 is offline  
Add Post to del.icio.us
Reply With Quote
Old 03-05-2004, 12:47 PM   #7 (permalink)
Contributing Member
 
Join Date: 12-03-03
Location: Dallas, Texas
Posts: 154
iTrader: 0 / 0%
Latest Blog:
None

POR-15 Depot is a jewel in the roughPOR-15 Depot is a jewel in the roughPOR-15 Depot is a jewel in the roughPOR-15 Depot is a jewel in the roughPOR-15 Depot is a jewel in the roughPOR-15 Depot is a jewel in the rough
Send a message via ICQ to POR-15 Depot Send a message via Yahoo to POR-15 Depot
GOT IT !!

Thanks
__________________
Dave
POR-15 Depot
POR-15 Depot is offline  
Add Post to del.icio.us
Reply With Quote
Old 03-05-2004, 01:15 PM   #8 (permalink)
Contributing Member
 
Join Date: 12-03-03
Location: Dallas, Texas
Posts: 154
iTrader: 0 / 0%
Latest Blog:
None

POR-15 Depot is a jewel in the roughPOR-15 Depot is a jewel in the roughPOR-15 Depot is a jewel in the roughPOR-15 Depot is a jewel in the roughPOR-15 Depot is a jewel in the roughPOR-15 Depot is a jewel in the rough
Send a message via ICQ to POR-15 Depot Send a message via Yahoo to POR-15 Depot
Hey ya gotta play with what ya got
I looked in to the code of the other pages and found parts of what I needed and managed to get it working. The code posted pointed me in the right direction, was all I needed.

Thanks again..
__________________
Dave
POR-15 Depot
POR-15 Depot is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
CFML::Simple Query for date functions need help plz Foxtrck Coding Forum 1 12-15-2007 09:38 AM
Why does this not output? thenextbesthang Coding Forum 3 12-29-2006 12:31 PM
Input (FORM) - Output (EMAIL)...Help me! maptomal Coding Forum 1 05-07-2006 12:23 PM
simple show date and adjust timezone I, Brian Coding Forum 31 01-14-2004 12:54 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 05:33 AM.
© Copyright 2008 V7 Inc