john wrote:

Looking for code help: When my php script inserts data into the database I'd
like to parse an html page for a date and replace it with the current date.
This way visitors to the main html page can see the last time the database
was updated. I know I could re-write the html page using php but would
rather leave it html. Anyone have code to parse and replace based on a
hidden tag?

Thanks


It can be as simple as opening the file, reading the file, looking for the "hidden tag" with a regular expression while writing to a temp file line by line, and if all that happens with no errors, replacing the html file with the temp file.


Simple, just a few steps involved, eh?

Me thinks is would be easier to rename the file from a html extension to a php one....leaving all content as is....just rename....and using one little sniplet of php to output the date in the document.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to