prcollin Posted May 20, 2008 Share Posted May 20, 2008 Ok what would be the easiest way to have a form, have the values entered into the form placed into variables throught the website design code and then have the final code submitted to a directory as an .html or .php file. basically i just want a website that people enter some values in a form and it automatically places them int heir spots. I have a form input for "Page Title" so I have <input type="text" name="title"> Then there is the page design part that says like <title> and I want it to be able to read the input and auto populate that design Quote Link to comment Share on other sites More sharing options...
Psycho Posted May 20, 2008 Share Posted May 20, 2008 If I am understanding you correctly you want the user to be able to enter the information that will be used as part of the "template" for all the pages on the site. I see two choices: 1. Save the data to a database and create the pages on-the-fly. This allows easy updating of those values at a later time. 2. Use the input to create a flat file PHP script that all the otehr pages use. If the pages rarely change this might be an easier solution, especially if you don't have a database or do not want to learn how to use one. Quote Link to comment Share on other sites More sharing options...
chronister Posted May 20, 2008 Share Posted May 20, 2008 I agree with mjdamato in regards to the 2 options. I personally think that the database option would be the best solution. Although I will say that I have not messed with flat-file db's as they seem fairly challenging to manage. Nate Quote Link to comment Share on other sites More sharing options...
dare87 Posted May 20, 2008 Share Posted May 20, 2008 I currently use the db option and it works great! Don't know much about flat-file Quote Link to comment Share on other sites More sharing options...
Psycho Posted May 20, 2008 Share Posted May 20, 2008 FYI: For the "flat-file" implementation I was not suggesting to use a flat file as a database (although that is another valid option). I meant to use a template and then populate the user values as appropriate and then write the result as an HTML or PHP file. Quote Link to comment Share on other sites More sharing options...
prcollin Posted May 20, 2008 Author Share Posted May 20, 2008 FYI: For the "flat-file" implementation I was not suggesting to use a flat file as a database (although that is another valid option). I meant to use a template and then populate the user values as appropriate and then write the result as an HTML or PHP file. No i just want someone to fill out a form and it submit to a directory as an hmtl or php file. thats all Quote Link to comment Share on other sites More sharing options...
Psycho Posted May 20, 2008 Share Posted May 20, 2008 FYI: For the "flat-file" implementation I was not suggesting to use a flat file as a database (although that is another valid option). I meant to use a template and then populate the user values as appropriate and then write the result as an HTML or PHP file. No i just want someone to fill out a form and it submit to a directory as an hmtl or php file. thats all Isn't that what I just said? Use the input from the user with a template to create an HTML or PHP file? Quote Link to comment Share on other sites More sharing options...
redarrow Posted May 21, 2008 Share Posted May 21, 2008 what do you mean mate are you asking how to create a .html file with the current user settings...... Quote Link to comment Share on other sites More sharing options...
prcollin Posted May 21, 2008 Author Share Posted May 21, 2008 what do you mean mate are you asking how to create a .html file with the current user settings...... all i want is for someone to fill out a form and the informatino from the form is posted as an html file in a folder on my server thanks ahead of time 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.