Complete Insert script for PHP. Moved header into its own script and provided a "better" alternative to consider.