teedoff Posted November 15, 2010 Share Posted November 15, 2010 Hi first post here and very new to php. I built a form so that a data entry perosn can "build" new pages for our companies website. I pretty much have the basics of the form and the action page coded correctly, however my issue is that I need this final page where the form inputs are posted too to be an html document. I read some about the str_replace() function, but I'm not understanding how I could use that to replace the file extension of a page. Maybe I'm going about this all wrong. I also read that one can edit the htaccess folder to allow an html file to run php script. Not sure which way would be the best. One thing to mention though, is this application would be run locally to our back up files which is then scheduled to be uploaded to the remote server very night. Any help or suggestions would be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted November 15, 2010 Share Posted November 15, 2010 in case it helps, here is the first line in an .htaccess file that (on my servers) makes apache parse .html as .php AddType application/x-httpd-php .html i have it as first line in .htaccess Quote Link to comment Share on other sites More sharing options...
teedoff Posted November 15, 2010 Author Share Posted November 15, 2010 So this is a safe easy to implement way to resolve this issue? Also, am I to assume I can change this locally to allow all the pages to be edited in our local server? Thnks for the replay btw! Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted November 15, 2010 Share Posted November 15, 2010 I only meant to address this: I also read that one can edit the htaccess folder to allow an html file to run php script. It sounds like what you are describing is a content management system (CMS), which can be a rather complex system and a very broad topic. Quote Link to comment Share on other sites More sharing options...
teedoff Posted November 16, 2010 Author Share Posted November 16, 2010 Yes it is somewhat a CMS. Again, I pretty much have it working like I want. The issue is I would like the newly created pages to be somehow saved as .html files. I tried using dreamweaver templates, but the problem with those are that as far as I know you cant set up editable regions to edit meta content. Another issue that arose was the ability to edit har coded shopping cart inputs, but thats another topic for later. Quote Link to comment Share on other sites More sharing options...
teedoff Posted November 16, 2010 Author Share Posted November 16, 2010 Any other suggestions? Again I have a form that works pretty much exactly how I want. This form add values to specific html elements in the formResultsPage.php. The problem is, with my employer wanting all pages as .html documents only. how do I go about saving the forResultsPage.php to someFile.html after the data has been added to the html elements. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.