Jump to content

PHP to HTML


supermerc

Recommended Posts

Hey, I have a page, handout.php that prints out value, and I was wondering if there was a way to, on the click of a button, turning that php page into a html page with the date.

 

For example I click the button and it saves it as page22_07_07.html

 

And then clears everything from database that was in that table.

 

anyone  know how to do so?

Link to comment
https://forums.phpfreaks.com/topic/61200-php-to-html/
Share on other sites

You simply create a <form> which contains the date from your database (<input type="hidden" name="date" value="$date">) and then when you submit it you use the functions I've linked to below...

 

Check these functions out:

 

fopen(): http://no.php.net/manual/en/function.fopen.php

fwrite(): http://no.php.net/manual/en/function.fwrite.php

 

 

Link to comment
https://forums.phpfreaks.com/topic/61200-php-to-html/#findComment-304533
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.