473,320 Members | 1,868 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Going With a Flat-File DB for a Simple Comment Form

Hello All,

I'm trying to make a comment section on my website. However, I don't
want to set up a MYSQL database to do so because I want to make it
really simple, just a form that asks for their name and comment. Is
there any way I can store this information in a flat file and then use
PHP to display the comments and names? I was thinking that XML might be
good for this, but I don't know any XML.

Thanks,
Jacob

May 10 '06 #1
4 2129
mysql is the best solution, I thinks in this way.
my choice certainly would be mysql

[]'s

May 10 '06 #2
sure you can use a flatfile. just pick a good delimeter to seperate the
names and comments. Then read in the file using file () and split each
line into an array using preg_split ( '/delimeter'/ ...
then write out the comments. forget mysql for such a simple thing.

May 10 '06 #3
On Wed, 10 May 2006 14:48:43 -0700, squash wrote:
sure you can use a flatfile. just pick a good delimeter to seperate the
names and comments. Then read in the file using file () and split each
line into an array using preg_split ( '/delimeter'/ ... then write out the
comments. forget mysql for such a simple thing.


or use explode("delimited", $string) which will be quicker than preg_split.

Cheers,
Andy

--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos

May 11 '06 #4
On Thu, 11 May 2006 11:02:38 +0000, Andy Jeffries wrote:
On Wed, 10 May 2006 14:48:43 -0700, squash wrote:
sure you can use a flatfile. just pick a good delimeter to seperate the
names and comments. Then read in the file using file () and split each
line into an array using preg_split ( '/delimeter'/ ... then write out
the comments. forget mysql for such a simple thing.


or use explode("delimited", $string) which will be quicker than
preg_split.


And wouldn't have the downsides of having to ensure you avoid regular
expression special characters (for example, not that you would, but you'd
have an issue if you picked . as your separator).

Cheers,
Andy

--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos

May 11 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Christopher Boomer | last post by:
Until now I have been using XSLT to translate from a known foreign XML format to a local XML format for import to Postgres. Now I need to be able to let others define the relationship from new...
11
by: Nicolas Girard | last post by:
Hi, Forgive me if the answer is trivial, but could you tell me how to achieve the following: {k1:,k2:v3,...} --> ,,,...] The subtle point (at least to me) is to "flatten" values that are...
699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
7
by: gsoftwares | last post by:
Hi XML Guru, I need to transform flat xml to Hierarchy xml. Can some one help me get started or have a same code with them my flat xml: <rowset> <row>
5
by: Bruce W...1 | last post by:
How does one make a flat-looking button or text field? That is with no bevelled edges, maybe just a thin line on the edge? I know you can do it with Macromedia Flash but there must be other...
1
by: krish | last post by:
I am developing a portal using ASP.NET and C# Almost all controls i can get flat style(Using borde style proprty)except dropdownlist,listbox,checkbox how can i make these controls to the flat...
2
by: Dhanvi | last post by:
Hi, I have another question for the group. I would like to know if there is a quick way by which I could store a Queue in a flat memory space without the use of iterators ? Thanks -Dhanvi
0
by: Shibu | last post by:
Hi, I have a situation where I need to convert business objects to a flat table. The reverse is also required. I am using c# and Oracle ODP. I am looking for an easier method to do the below...
11
by: reciprocity85 | last post by:
Hello all. I have a question about what you all get paid, and what I should expect in my situation. I googled quite a bit, but not come up with any benchmarks definite enough that I would want...
2
by: Peter Steiner | last post by:
hi there! my problem: i need arrays of float-triples (math vector). i need these available in a flat float* array for batch processing (opengl). is an array of POD structs with three float...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.