Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

php addition

Status
Not open for further replies.

flyingsheep

Technical User
Apr 24, 2004
15
US
all i need to do is, in an html document, add one to a number every day at a specific time, how could i do this?
 
I'm not sure I understand your question, but I think that a scheduled script should do what you need done.

Using either cron (if on a unix-like OS) or the scheduler service (if on a Win32 OS), you could have a script run which performs the needed operation.

On most systems, it's not necessary to invoke a PHP script through a web server -- usually, a stand-alone PHP interpreter is available, too.



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
but is there some way the number could be incrimented automatically on the webserver on which the html file is located?
 
I don't understand.

Some mechanism must be set up for the increment to happen. This must be some kind of scheduled activity -- that's the "automatic" part of the question.

But I don't understand what you mean about an HTML file. An HTML file is a static file -- incrementing some counter somewhere will not affect the file.



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
If the file is flat HTML your only hope is Javascript, to fake a number in the page that works out from the current date what number should be there. Otherwise, use PHP and do a cron job as described above.

--BB
 
here is where i need the counter:

<P><A href=" src="/Merchant2/graphics/00000001/sundays/thumbnails/062704.gif" width="300" height="71" border="0" lowsrc="media/eyesanim2.gif"></A></P>
</TD> </TR> </TABLE>
i need the counter where it says Product_Count=23, cant i do this in php?
 
That doesn't help.

The reason I'm asking is that the meaning of the number might give a clue as to the best way to update it.

However, if it's just a placeholder, it sounds to me like it's just an arbitrary value.



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top