Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

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

Posts: 2
Trades: 0
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
 
 
Register now for full access!
Old 04-11-2004, 10:46 AM
david's Avatar
King Spam Talker

Posts: 1,314
Location: Glasgow, UK
Trades: 0
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))
__________________

Please login or register to view this content. Registration is FREE
- Everything a webmaster needs - for free

Please login or register to view this content. Registration is FREE
- Free web hosts reviewed and rated

Please login or register to view this content. Registration is FREE
- Impartial hosting directory - Add your host today for FREE
david is offline
Reply With Quote
View Public Profile
 
Old 04-12-2004, 12:54 PM
ppedersen's Avatar
Super Talker

Posts: 115
Location: Tampa Bay, FL - USA
Trades: 0
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 ;-)
__________________

Please login or register to view this content. Registration is FREE
(
Please login or register to view this content. Registration is FREE
)

Please login or register to view this content. Registration is FREE
's Website
ppedersen is offline
Reply With Quote
View Public Profile
 
Old 04-13-2004, 04:21 PM Re-Updating a value based on the current month
Junior Talker

Posts: 2
Trades: 0
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, 05:17 PM
david's Avatar
King Spam Talker

Posts: 1,314
Location: Glasgow, UK
Trades: 0
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.
__________________

Please login or register to view this content. Registration is FREE
- Everything a webmaster needs - for free

Please login or register to view this content. Registration is FREE
- Free web hosts reviewed and rated

Please login or register to view this content. Registration is FREE
- Impartial hosting directory - Add your host today for FREE
david is offline
Reply With Quote
View Public Profile
 
Old 04-13-2004, 05:28 PM
ppedersen's Avatar
Super Talker

Posts: 115
Location: Tampa Bay, FL - USA
Trades: 0
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.
__________________

Please login or register to view this content. Registration is FREE
(
Please login or register to view this content. Registration is FREE
)

Please login or register to view this content. Registration is FREE
's Website
ppedersen is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Updating a value based on the current month?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB 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.76532 seconds with 12 queries