I now have the input script thanks to someone here at DP In the input (text area), depending on whatever the user enters (for example "demo"), then the input is saved in one MySQL database table. If he enters "demo1" the input is saved in another MySQL database table. Demo and demo1 will be the only options anyway to enter, I may make it multiple choice. This way it would be easier to sort out which data is going into the other. Thanks!
probably be better to use a <select> than an input box. i have found that if you want a user to enter certain data, make them, dont give them a choice. if you want a, or b... dont give them a textbox where they can type "bugg off" give them a <select> box where they can only choose a, or b.
Assuming your field name is "input," you would do something like the following: $input = $_POST['input']; switch $input { case "demo": // Code for this data break; case "demo1": // Code for this data break; case "demo2": // Code for this data break; default: // Code for data that doesn't fit elsewhere } PHP:
in this case radio input will be best because there have to be an option already selected. Also select menu without the Please select.. option
Thanks this is what I need. Is it possible to save the input demo into one mysql table, then demo1 be stored into another? Thanks
yeah, just put the code to insert to the 'demo' table in the case "demo": part. same goes for the rest of it.
Ok here's the code I have: (I have decided not to use MySQL) This here is the script to save the information that was entered. As you can see the fwrite out is different, as it is $family, etc.. How can I change that to show the input "case" and then have the script send the data to 2 different files? Thanks
http://www.programmerstalk.net/thread712.html#post1613 or http://www.htmlcenter.com/tutorials/tutorials.cfm/149/PHP/ probably good source for you it's been helpful for me