Lokesh
Lokesh

Reputation: 849

what is the best way to store long text entered in the website using php

I would like to know what is the the best way to store the information given by the user. Say the customer has entered 'n' number of lines.

Which one is the best way to store the text, either to the DB or to the file. Also which is the best way to retrive using PHP.

Thanks, Lokesh.

Upvotes: 0

Views: 309

Answers (2)

swatkins
swatkins

Reputation: 13630

Your question is dependent on many variables and is a bit objective. However, I find that saving to a database is better for maintainability. Although you can search, filter, etc. from a file - it's a bit more native and simpler through a DB api.

Upvotes: 1

Mob
Mob

Reputation: 11098

Using a database is the best way. It is secure. Retrieving and storing are easy.

Upvotes: 1

Related Questions