₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,330,407 members, 8,445,376 topics. Date: Tuesday, 14 July 2026 at 10:42 PM

Toggle theme

Submiting Forms To A File Not A Database - Webmasters - Nairaland

Nairaland ForumScience/TechnologyWebmastersSubmiting Forms To A File Not A Database (798 Views)

1 Reply (Go Down)

Submiting Forms To A File Not A Database by pholusho(op): 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"wink; //finish
?>

To retrieve back
$data=unserialize(file_get_contents("myform.txt"wink);
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? tongue

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

I Need Steps To Creating A Database Using WampserverSave Facebook Comments Into A DatabasePhp/mysql. Does Every Php Script Need A Database?234

Please Where And How Can I Get Website Design Jobs.Need Someone Who Can Edit Fiverr Clone Sites Or Script.Urgent Help Please!!!