Storing and Retrieving Data to a MySQL Database with PHP
Author: Shaunk...
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
Functions - The Basics
Author: Shaunk...
Over the past few months I've been predominantly focussing on developing my Javascript and jQuery competence.
Functions are a very powerful and efficient way of grouping, executing and reusing code. They're a standard part of many scripting and programming languages including Javascript, Actionscript and PHP so getting familiar with the syntax and how they work can be very rewarding.
There are two stages to any function; declaration and invocation. Imagine this to be an author-reader relationship, the latter utilising information created by the former. Highly effective as you only need one author to satisfy millions of readers.
The basic structure of a function declaration is as follows.
function nameOfFunction(listOfVariableNames) {
code to be executed goes here
}
And to invoke (or call) a function you would place the following code wherever required:
nameOfFunction();
Or for functions with variable parameters you would call as follows:
nameOfFunction(listOfVariables);
Pretty simple. This is all you really need to know to start using functions.
They're are further ways of achieving similar results and you can also assign functions to variables in some languages. See one of these links for more information about a specific language.
Javascript | Actionscript | PHP
Creating Worpress Themes
Author: Shaunk...
Here's a nice and very straigt forward guide to creating your own themes:
WPDesigner.com - so you want to create Wordpress themes huh?
Setting Up Wordpress Locally
Author: Shaunk...Wordpress is great! It's just so very simple to use and intuitive. I'm leaning about creating custom themes and Wordpress based websites. There is a nice tutorial here on Geeks are Sexy telling you how to set up locally. I'm using WAMP instead of XAMPP but the process is the same.
Who's a Pretty Permalink?
Author: Shaunk...

Permalinks are them squiggly wiggly long strings of letters/numbers/characters which point to the informative tit-bit of which you peruse.
Anyway. More often than not they look like nonsense and drivel. Here is a bit more info on how to make Worpress links a tad more easy in the eye:
http://codex.wordpress.org/Using_Permalinks
Writing You Own Mail Processing Scripts with PHP
Author: Shaunk...

Time to move on from them handy little HTML form generation apps and tools and learn what's involved in writing them myself.
Yes, indeedy-doo.
Creating the actual HTML form is the easy part. This can be done by any old bean with a pair of hands, it's pretty simple coding and even easier select-from-drop-menu simple if you use Dreamweaver.
The complicated part is collecting the data from the forms and doing something with it. Now I am still a PHP novice so this was also a learning experience on this level.
Here's some good tutorials on the subject:
The Site Wizard
PHP.net
w3schools
