Jump to content

Passing variables via POST without a Form?


ravix76

Recommended Posts

OK, please excuse my Noob level of PHP understanding.

Self taught over the last 6 months but I'm throroughly addicted and enjoying it!

 

I'm developing a dynamic database which has the following structure

 

- Brand Name Menu

    - Product Name Menu 1

      - Individual Product Pages

    - Product Name Menu 2

      - Individual Product Pages

    - etc

 

All of this is dynamic and using the code referenced in another post here, I want to periodically dump the whole lot to Static HTML to ease server load and help Search Indexing. I can get this working on a page by Page basis but want to create a "Build All" link to process the whole database automatically, by CRON.

 

I was going down the route of using a common "php2html.php" file which would require variables "PHPSourcePage" and "TargetStaticHTML-Page" to be passed to it. This would then be continually recalled as the script worked it's way through the product pages (id's) in my database and then finishing with the Menu Pages. The Variables might be quite long, hence using POST.

 

This is my methodical thought process. If there's an easier way, I'd be interested to hear!

 

Thanks

 

Thinking about it again, after some food and strong coffee... I should be able to just do a WHILE loop and call the "HTML2PHP" file as an PHP include / require, thus not needing to pass the variables at all?

 

If it works, I feel a Homer Simpson "Doh" coming on....  off to try!

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.