Category Archives: MiniMorsels

How to MySQL – PDO bindParam() vs bindValue()

This post is in process. It will discuss and demonstrate the difference between using bindParam() which sets a placeholder by reference and bindValue which sets by value.

This PHP script is for creating a PDO connection object

Continue reading

How to Install WordPress 3.5 Using cPanel on Live Site / Shared Host

This tutorial walks through a 25 step WordPress 3.5 install using cPanel. How to Video at end of Post.

We’re going to install the WordPress files in a sub-directory of our Document Root that is named something other than WordPress. This makes it a touch more difficult to exploit WordPress weaknesses for Bots from the dark side that are scanning our sites.

To have our site operate gracefully, we’ll need to take a couple of extra steps (simple and effective, see steps 6, 7, 8, 9 and 24 below).  These steps allow our site to be accessed with http://mydomain.com while our WordPress files live happily ever after in their sub-directory. For this demo our site address is http://waimanusolutions.com while our WordPress files are located at http://waimanusolutions.com/mywpdir/.

Continue reading

How To MySQL -PDO from PHP – Connect and Query on localhost XAMPP

Below please find the Code Download, Video Description, List of Ingredients, The 3 php files with syntax highlighting and table structure screen prints of the 2 tables and the embedded video.

1/6/2013 UPDATE – Please note that you must use the bindParam or bindValue options to protect yourself from injection. They will be used on UPDATE and INSERT operations – separate post and video coming soon.

Here the code (3 php files and the ingredients text file) – MySQLPDOFromPHPZippedFilesForDownload

Continue reading

Learn JavaScript With Me – Global Post



 

To see, play and debug the exercises please go to js.davecoast.com (this is our little sandbox for learning) – this is also the link on the Nav Bar called LearningJavaScript.

We’re going through the book – Modern JavaScript: Develop and Design written by Larry Ullman (LarryUllman.com).

Here’s all the code so far (all exercises up thru Chapter 11) - HTML, JS and CSS

Continue reading

MiniMorsel – Learn JavaScript With Me – NameAlizer

Learn JavaScript With Me – NameAlizer. Check out js.davecoast.com to see the exercises in action. Here’s all code - js.davecoast.com zipped JavaScript, HTML and CSS

This chapter 4 exercise (the last one) introduces concatenation. We accept a first name and a last name from the visitor and return a newly formatted string that contains the last name, a comma, a space and the first name.  It’s another simple program with an event listener and a function to handle some simple page element text. The most important learning tools for me is to type each item into the text editor (I’m using Notepad++). Just making a couple of typos by leaving out an apostrophe or messing up a bracket [ ] , brace { } or parenthesis ( ) really reinforces the syntax. After 100 scripts or so I’m sure I’ll be comfortabe to just copy in snippets. At this point of the learning process, I think the only way to get it down is to manually type each line myself (no shortcuts – yet…)

This is forcing me to complete each of the books exercises that are so easy to skip. Just getting through the 4 extremely easy Chapter Four exercises has been worth the price of the book. I’ve built some simple HTML and CSS to showcase the exercises. Lets get the Hello World Chapter 4 behind us – my summary is below. Next, Chapter 5 gets into Conditionals (If Statement syntax). Yep, I’m with you, it very tough trying to resist the urge to skip ahead. I have to know how to bake a cake before I can put the icing on it (or so I’ve heard)… Continue reading