Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,194,696 members, 7,955,631 topics. Date: Sunday, 22 September 2024 at 11:31 AM |
Nairaland Forum / Science/Technology / Webmasters / Submiting Forms To A File Not A Database (651 Views)
I Need Steps To Creating A Database Using Wampserver / Save Facebook Comments Into A Database / Php/mysql. Does Every Php Script Need A Database? (2) (3) (4)
Submiting Forms To A File Not A Database by pholusho(m): 1:19pm On Jan 05, 2012 |
Please am trying to use dreameaver 8 to create a form which i want to submit its information to a file not a database, please does anyone as an idea how to go about this. Thanks |
Re: Submiting Forms To A File Not A Database by Nobody: 1:24pm On Jan 05, 2012 |
form_submit.php <?php //submission script $data=serialize($_REQUEST); //or $_POST or $_GET file_put_contents("myform.txt" //finish ?> To retrieve back $data=unserialize(file_get_contents("myform.txt"); then you can do stuffs like echo $data['username']; //or you can use var_dump($data); to test it Any further info, send me an email - support @ . net |
Re: Submiting Forms To A File Not A Database by yawatide(f): 1:27pm On Jan 05, 2012 |
Seems like it would make more sense (and perhaps more secure as well) to dump the contents of the form into a database. By so doing, you also get to compartmentalize (is this the right word?) the form data (name, phone, etc). Not to mention, assuming you intend to get submitted forms from more than a few submissions, sure you can parse out the respective content but again, I think this is a messy approach. Why, might I ask, do you want to put the stuff in a file? Perhaps that is the very reason why a database is not needed and I would definitely stand to be corrected. |
Re: Submiting Forms To A File Not A Database by Nobody: 1:37pm On Jan 05, 2012 |
^^^Mayhaps, he is trying to use a flat-file database. . . . |
Re: Submiting Forms To A File Not A Database by yawatide(f): 3:53pm On Jan 05, 2012 |
Come on man! Isn't a database in essence a flat file? The advantage of the database, among others, is that things would be more modular, easier to search and depending on how you go about your code, more secure. |
Re: Submiting Forms To A File Not A Database by Nobody: 4:26pm On Jan 05, 2012 |
A flat footed database actually. I think we should probe the guy. |
Re: Submiting Forms To A File Not A Database by malikusman: 5:04pm On Jan 05, 2012 |
There are many kinds of databases, and you'd have to specify what kind of database you're talking about. I have experience with the MySQL Database, which is a fairly typical one, and very common. Most databases are like MySQL in that they operate in "transactions": steps that change or return information about the database, and which can be run one at a time. A few examples of transactions, as well as some information about databases: ______________________________ download full version games |
Re: Submiting Forms To A File Not A Database by Nobody: 6:49pm On Jan 05, 2012 |
^^^So your point is? |
(1) (Reply)
Get A Professional Wordpress Blog/website Like This One Here / Adsense For Newbie / Nairaland !!! Doesn't Have A Content Page
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 10 |