Save information in form as txt file.

Hello,

I’m new here and know next to nothing about PHP, I know there’s another topic just down a few that is close to the same thing but i don’t understand a thing at all about PHP. If someone feels up to helping me i can actually post the code and have you modify it. Sorry if this upsets anyone.

What I want to do is to change the code on a submit button in a PHP page that has a HTML style form on it. The form is used to submit builds for characters in a popular online RPG game called Ragnarok Online. I would like to be able to get the Submit button to look at the first Text feild and take the value from in that feild and use it as a file name. For example the first text field is “Build Name” and example data in this field would be Priest - Support. I would like when clicking the submit button that it will generate a text file then called “Priest - Support.txt” or what ever text the user submitted in the “Build Name” text field.

What i’m thinking is that the first peice of the form needs to some how send the information inputed into it to a varible probbly called $filename or something simular. Then the submit button would have to be able to not only save the form as a text file but be able to take the information from $filename and use that as the name to save it as. Also it would be really nice (not sure if this will just happen by default) if the submit button would refresh the page after the file is saved.

Is this possible? and if so could someone give me an idea what the code would look like. I’m very greatful for your help in this matter. Since this is not one of my strong suits.

Thanks for reading this.

To learn some of the basics of PHP go to http://www.codewalkers.com in the tutorials/basics section there are many fine tutorials for working with forms and text files. Read them, try them, see how they might be of use for your problem. Then tell us what you have done to fix your problem and where you are lost/confused/or don’t understand. We will they help to guide you to the next step.

If someone feels up to helping me i can actually post the code and have you modify it.

We are here to help YOU learn how to fix your problems not too do it for you for free. If you want someone to do it for you - pay them like the professionals they are.

Sponsor our Newsletter | Privacy Policy | Terms of Service