Reply
Updating a value based on the current month?
Old 04-10-2004, 01:04 PM Updating a value based on the current month?
Junior Talker

Posts: 2
Hello everyone,

I have a page that display a membership rate; say $68 / month. But this value going to go up a $1 every month through August/04.

So my question is: rather than manually updating the page for each month, is it possible to have it increased automaticaly based on the current month?

I thank you for your help

BJ
bhatijay is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 04-11-2004, 09:46 AM
david's Avatar
King Spam Talker

Posts: 1,314
Location: Glasgow, UK
If you're using PHP:
PHP Code:
<?
$month
=date("m");
$year=date("Y");
if ((
$month<9) && ($year=2004)
{
$memberprice=64+$month;
} else {
$memberprice=72;
}

echo 
"$".$memberprice;
?>
(price is 64 as you would need to calculate the price if you started at the begining of the year (as we've had 4 months, it will start at 68 (64+4))
__________________
Free Webmaster Help - Everything a webmaster needs - for free
Free-Webhosting.info - Free web hosts reviewed and rated
Web Hosting Hunt - Impartial hosting directory - Add your host today for FREE
david is offline
Reply With Quote
View Public Profile Visit david's homepage!
 
Old 04-12-2004, 11:54 AM
ppedersen's Avatar
Super Talker

Posts: 115
Location: Tampa Bay, FL - USA
You might be able to dig through and find some JavaScript here: http://javascript.internet.com/

...but it will probably be faster just to change it once a month ;-)
__________________
Profile (all posts)
Paul Pedersen's Website
ppedersen is offline
Reply With Quote
View Public Profile Visit ppedersen's homepage!
 
Old 04-13-2004, 03:21 PM Re-Updating a value based on the current month
Junior Talker

Posts: 2
David,

I am working with HTML. Will you be able to show me the code in HTML?


Thanks,

BJ
bhatijay is offline
Reply With Quote
View Public Profile
 
Old 04-13-2004, 04:17 PM
david's Avatar
King Spam Talker

Posts: 1,314
Location: Glasgow, UK
You won't be able to do that directly in HTML. You will need some sort of scripting. Like Paul said, you'll probably need to use JavaScript. It's almost the same as the PHP code, though.
__________________
Free Webmaster Help - Everything a webmaster needs - for free
Free-Webhosting.info - Free web hosts reviewed and rated
Web Hosting Hunt - Impartial hosting directory - Add your host today for FREE
david is offline
Reply With Quote
View Public Profile Visit david's homepage!
 
Old 04-13-2004, 04:28 PM
ppedersen's Avatar
Super Talker

Posts: 115
Location: Tampa Bay, FL - USA
Quote:
You will need some sort of scripting. Like Paul said, you'll probably need to use JavaScript.
But if you just go ahead and learn PHP, everything in your life will be easier ...like getting hot chicks to date you. (JUST KIDDING)

But seriously BJ, you'll be amazed by how many cool things you can do with just a tiny bit of PHP knowledge. Plus there are tons of free PHP scripts out there ...far more than any other type of script, including JavaScript.
__________________
Profile (all posts)
Paul Pedersen's Website
ppedersen is offline
Reply With Quote
View Public Profile Visit ppedersen's homepage!
 
Reply     « Reply to Updating a value based on the current month?
 

Thread Tools

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 Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.33089 seconds with 13 queries