OK today's challenge. I'm looking to store and retrieve data, specifically testimonials. I've done this before with Flash but am now looking to do it with PHP alone.

Initially my intention was to store data to an array. This doesn't seem suitable now as I need to retrieve the data and display the name separately, from the review and also display a shortened extract of the reviews on other pages. Concatenating the review is no good as this can crop the paragraphs in unsuitable places.

I decided the best option is to save form data to a MySQL database. Then a separate field for name, extract & full review can be given.

I not an expert so I'm making this up on the fly! Here's a few resources...

How to Access a MySQL Database Using PHP

Inserting Data Into a MySQL Database using PHP

Storing User Submitted Data and Files in MySQL


MySQL Docs

 

0 Response to “Storing and Retrieving Data to a MySQL Database with PHP”

Leave a Reply