All posts by Steven

WordPress – Creating a Simple mySQL Query Plugin

Simple PHP WordPress Plugin to Query Database

Creating a plugin for WordPress is relatively simple and getting information back into your blog post or page. Take a look at the following video to cover the basic steps of creating a plugin. Once you understand how to create a basic plugin, we will dive into creating a plugin to query a mySQL Database.


WordPress Creating your first simple wordpress plugin


Below Plugin lists how to make a simple DB query plugin. Below is also a 2 hour video of the process of creating the plugin thru trial and error


Plugin Build Video showing the process of creating a mySQL Plugin for WordPress



Script is just the basic DB configuration so you don’t have to store your user and password in your main script



You may also be interested in the Amazon API Post or the PHP Email Form


Please go ahead and leave me a comment…

I would love to hear from you and if I have missed anything, let me know and I will add it.

I would appreciate you linking back to my blog if you found any of these articles useful.

WordPress Blue Line on top of table

Line on top of wordpress table

Removing a line on top of your wordpress table

For those who have run into this issue, it seems to be related to the over effect over a table possibly or just a style issue. Anyway this is how you get rid of it, it may or may not work for you, but I have two pieces of code which may help you.


The first is one suggested by GraphicCove at the WordPress Support Site


Either add into your styles for your theme which I don’t like modifying my them, so I use the CSS Plus Plugin and can add code for each post page.


The other one you can try is this piece of code which I found, which worked on my 2nd blog before I found the above code.

Line on top of blue press table

The other one GraphicsCove suggested you try is the following if his first one doesn’t help



You can check out the suggestions from GraphicsCove here on the WordPress Support Site





You may also be interested in the Amazon API Post or the PHP Email Form


Please go ahead and leave me a comment…

I would love to hear from you and if I have missed anything, let me know and I will add it.

I would appreciate you linking back to my blog if you found any of these articles useful

PHP – Infinite Scroll Pagination using JQuery Ajax Example

Infinite Page Scroll Logo


How to make a site with infinite page scroll

All credits for the code go to these guys at for the code. The code is good, but it has an issue if you scroll too fast with the browser, it gets confused and duplicates lines which makes things pretty messy quickly. I found a fix on Stack Flow which corrects the problem, so I am going to post the new code to use. Most of the code is the same except for the AJAX stuff, there is a bunch of changes we need to make.


You can see the scroll in action here


Step 1 – Create the Posts table


Step 2 – Create the DB Configuration file



Step 3 – Create index.PHP




Update to JavaScript in index.PHP

Notice all the loaded = statements. Also the if statement had to be updated. You can read the original StackOverFlow Article here



Step 4 – Create data.PHP



Step 5 – Create loadMoreData.PHP




You may also be interested in the Amazon API Post or the PHP Email Form


Please go ahead and leave me a comment…

I would love to hear from you and if I have missed anything, let me know and I will add it.

I would appreciate you linking back to my blog if you found any of these articles useful.

Creating a YouTube Pop Up Window (onClick) Logo


Creating a YouTube Popup Window

Create a small pop window with a youtube video with minimum code requirements.


Youtube Pop Up Example


If you want to see it in action, click here and then click on the Watch Video Link


Javascript Code

Please this code in between your html header tag. Original Post can be found here on StackOverflow




My Changes

I made slight changes to the code as I wanted to be able to input a youtube url. This doesn’t seem to work with the shortened version of the youtube URL



My $post variable would equal a field from my DB, notice I have added the embed into the URL


You may also be interested in the Amazon API Post or the AWS Cloud as Personal WebServer Post


Please go ahead and leave me a comment…

I would love to hear from you and if I have missed anything, let me know and I will add it.

I would appreciate you linking back to my blog if you found any of these articles useful.

PHP Use the Amazon API to Get Product Prices

Amazon Price API

Getting prices using the Amazon API

I am going to show you how to use the script below to get a price using the Amazon API, the easiest way. I appreciate you linking back to my website if you find this useful.

Here is a great script to grab the prices from the Amazon. I found this well-written script by this SITE. What I found is that it printed out the raw API information which I couldn’t use.

Then I found this website and a post from Alejandro which helped explain how to use it.


The just of it is to use the following call to get the price for the product you provide from the $response = getAmazonPrice(“com”, $asin);

Snippet of code to grab the price from the $response

Notice the return $response[‘price’]; This will deliver the price you are looking for for the product. $response[‘code’]; will provide the currency such as USD or CAD

I think take the price and update my database tables daily with the Amazon prices. I am not sure if the prices have to be done in real time but figured this would just slow down my website, so I thought updating maybe once or twice a day would be sufficient.


Amazon.PHP API get Price code


Updating DB with Prices

Populating your mySQL Database with the Prices which you can query later, I run this nightly, you may find this useful.

I just run it on the command line, php -f price.php. You don’t need the html.


Please go ahead and comment…

I would love to hear from you and if I have missed anything, let me know and I will add it.

I would appreciate you linking back to my blog if you found any of these articles useful.


You may also be interested in the Email Form Post.

PHP Email Contact Form

Bootstrap Contact Form

If you one of those guys struggling to get the PHP Mail to work like it should, take a look at this form. I have used a PHP/HTML Form and perl to send the actual mail. I couldn’t get the php mail to work, no matter what I did to the php.ini. I had no issues sending mail from the command line, just not from a php file. I decided to use perl to send the actual mail which worked just fine, although I shouldn’t have had to go to perl to send the mail. I personally think the PHP Mail implementation is seriously broken.

I got the original form here, by Pavel Malos, it’s worth checking it out as it may work for you. I like the look of the form with the curved boxes vs the general boring boxes.


You going to need the following to make this work

Contact Form

What the final contact form will look like, you can play around with the background colour.

Image of What the form box looks like


This is the final PHP/HTML code that displays the form, make sure you grab the css file as well or use the link below in your code and don’t forget to get the You can see this form in action at


This is my mail.cgi I pulled from my scripts and you can test it from the command line by running perl mail.cgi and it should run with no errors.



This is an old but reliable cgi library, I searched and doesn’t seem to be readily available on the internet. There are probably some other libraries you can use instead that are more modern, but I have been using this one for over 10 years and know it works and is solid.


Please go ahead and comment

I would love to hear from you and if I have missed anything, let me know and I will add it.


You might also want to take a look at my review of creating a Personal Webserver on AWS Cloud.

Dog Collar Battery Petsafe RFA-67 Hack Battery Replacement

RFA-67 Hack Battery Replacement


Hack the RFA-67 ?

Want to hack your RFA-67 Collar and save on those expensive batteries? Before I would recommend you do hack it and if you still want to, go ahead and watch the video, but there is no point any more and can recommend you buy some cheap alternatives off Amazon instead, see links below.

Batteries have significantly dropped in price.  If you live out in the boonies and don’t have access to order them and still want to get some cheaper batteries at your local store and hack the collar, go ahead and watch the video.


RFA-67 Dog Collar

RFA-67 Dog Collar



Where to find the Dog Collar ?

Dog Collar Sold on Amazon


Basic Bark Collar RFA-67 from Petsafe


Where to find Replacement RFA Batteries ?

Batteries 1 on Amazon

Batteries 2 on Amazon

Batteries 3 on Amazon

20 Sony Batteries on Amazon

10 Batteries on Amazon


Why I am moving my domains from Netfirms to Namesilo

List of Domains available


Netfirms vs NameSilo


I have used many registrars over the years and each year they seem to get more expensive. I get these businesses need to make a profit, but they seem to be into the nickel and dime business model. I have about 5 – 10 domains, so I am looking for a reasonable price for an adequate service. The thing that really made me move this  year was the renewal price. I was ok to pay around $10 to register a domain but also to renew a domain, but when I noticed quite a jump in cost, that made me start looking.


I did a quick search and quite a few names popped up

  • GoDaddy of course
  • Namecheap
  • Tucows
  • 1&1 (Supposedly the cheapest for 99c but bad reviews)
  • NameSilo

and a few others. I hadn’t heard of NameSilo before, but found them on a forum that somebody was recommending. I think I had used Namecheap before but hated their interface for one reason or another and I don’t think they were that inexpensive.


There are a lot of mixed reviews on the internet so do your research. One of my requirements is that the registrar must be able to register .CA and .COM domains, so I can keep my domains all in one area.




I am currently with Netfirms but plan to move all my domains away from to NameSilo. There were really two issues I had with Netfirms, one their renewal price was too much especially when it was converting the cost in to CAD$ for me and two this is a big one, the Privacy setting is an extra $10 a year. I mean, seriously ? In order to have a privacy setting, I need to pay $1 a month, not a set fee for all my domains .. I was used to using where the privacy setting was included and to be honest SHOULD BE included


I had recently registered a new domain and didn’t realize the amount of spam new domains created, I got at least 50-100 emails, plus I got endless calls on my phone that I provided and I am unable to stop them calling unless I paid $10 for the privacy setting, this absolutely made my blood boil that I was unnecessary subjected to this and the fact they trying to make an extra $10 off you per domain because they KNOW this happens. They have completely lost my respect and business.


Also I had many email issues with Netfirms, I never received my emails and couldn’t figure out why, try many changes to DNS etc. I was curious to see if I would have the same challenges on name silo and surprise surprise I did not, my email actually works, I was a little speechless.



Why NameSilo?


First off NameSilo’s renewals are the same price as the registrations and there motto is no hidden costs, check them out here. The second thing, I noticed registrations are under $10 which is great, it’s in the ballpark.


Third thing I noticed, the privacy setting is FREE and included in the cost of the domain, to be honest this is how it should be now days with privacy around domains and just privacy in general.


Setting up the domains was relatively straight forward, the domain screen allows you to click on the domain and a bunch of icons will highlight above the domain.


NameSilo Domain Setup Screen


Setting up DNS


Setting up DNS was a little more tricky, but watching a few youtube videos quickly made the process easy to understand. There are two things you can do.


Setup a DNS Server and point them to your DNS Servers if you run separate DNS Servers or you can configure or UPDATE DNS with your DNS Records, all very straight forward


NameSilo DNS Setup Screen


Video on how to point your domain to an IP Address




Managing the Domain


There are a bunch of different things you can do to manage the domain, make sure you Turn on the Privacy setting during registration, but if you miss, just head in settings and update the privacy settings, so you don’t get spammed.

Most of settings will default to the standard settings like locking the domain and parking the domain. I don’t particularly care for the new domain settings, so getting out of the parked domain is a little confusing. The nice thing you can do at NameSilo is setup templates, so if you have a domain transferred over already, then you can create a template and use this template to update the DNS Settings as above.


I wanted my email to go thru NameSilo which I forward to my personal accounts, but I want the domain to hit my web server, this can be achieved with similar settings as above.


NameSilo Domain Setup Screen



Things I like about NameSilo


  • Reasonably priced domains, perhaps the cheapest with no hidden costs
  • FREE Privacy Settings
  • Relatively easy interface once you get used to it, I would say it is easier to get around than Netfirms. The interface is a little dated, but it works.
  • Renewal fees are same cost as registrations
  • They seem open about the costs and seem honest in the advertising




I can recommend NameSilo to anyone look for a decently priced registrar with no hidden costs and a good interface. It probably takes 10 minutes to figure out the interface, but once you do it is a breeze.


I have used various registrars, domainsatcost, net firms, tucows, backspace and these guys rank up with the other guys and better. I thought I wouldn’t like the user interface, but it has grown on me.


Lasko Ultra Ceramic Tower Heater Review with Remote Control: Model CT30710C (Review)

Lasko Ultra Ceramic Tower Heater with Remote Control: Model CT30710C


This a review about this model of the Lasko Ultra Ceramic Tower Heater Model CT30710C which I personally own two of. My office is 330 square feet or 30 square meters 22′ x 15′ and it keeps it comfortably warm. I have 2 large windows but the office is downstairs and retains heat relatively well. Also see my review of the Wall Panel Heaters which I also reviewed for my office.


The heater is made by Lasko Products and can be found at


That been said, I am fairly impressed with this heater, it does what it says it does. What it does not do is blast loads of hot air out. It’s a small heater that rotates 180 degrees sending out a small wave of heat. I have a fairly large room and with the door closed, the room gets really warm in about 10 minutes to the point I have to turn off the heater. If you have a wide open area, it will take longer to heat up the area and it might just keep it at warm comfortable level vs it getting too hot. It is not going to heat of up a very large room and is meant for smaller areas. This heater is designed for supplemental heat, meaning you still will need other heating sources to keep your house/room warm potentially and it is going to depend on how cold your area is.


It does feel a little flimsy and have a bit of a plastically feel, but seems well built and looks elegant. The remote gives it a pretty cool feel and feels classy. We will have to see how long the unit lasts.


I have been feeling the temperature of the cable to see if the cable heats up near the plug and so far the power cable has been cold to the touch and doesn’t get warm.



The Lasko® ultra ceramic tower heater provides quick warmth with patented Quiet Force™ blower technology in an ultra-slim design. This fully-featured heater includes a multi-function remote control, 8-hour timer and thermostat. Save-Smart® technology allows you to maintain your desired temperature on lower wattage to keep you comfortable and save energy!


  • Features:
  • Multi-function remote control (2 AAA batteries included)
  • Save-Smart® technology: automatic electronic thermostat maintains comfort using less energy
  • Extended heat zone brings heat to your level
  • Widespread oscillation
  • 8-hour auto off timer
  • Adjustable electronic thermostat
  • Heating element: Ceramic
  • 3 settings: low, high, auto thermostat
  • Automatic overheat protection
  • Cool-touch housing
  • 1500 W


Remote Control


Make sure your version comes with a remote control, else it won’t be as much fun. The remote is well designed and has a shiny smooth finish which gives it a high class feel and smooth touch.  All the functions performed with the Remote Control work identically to the manual controls, except the ability to change from °F to °C and the shutdown.


1. A thermal overload protector is built in to prevent overheating.
2. If an overheat temperature is reached, the Heater will automati- cally shut off. It can only resume operation when the user resets the unit.



Lasko Ultra Ceramic Tower Heater Remote Control Image

Smart Save Feature

Press the Smart Save Button to turn on Smart Save. Essentially what this does is sets the heat to 22 degrees to start off with. You can lower it if you like. When it gets to 2 degrees above the temperature it will turn off saving you energy.

1. Set the thermostat to desired temperature using the +/-to activate the Save-Smart (Note: The default Save-Smart® temperature is 72 o F)

2. When you reach the temperature at which you want to set the unit, the set temperature will flash several times and then the display will return to indicate the current room temperature and will gradually change as the room temperature changes.

3. When the air temperature is less than the set temperature, the heater will run in HIGH heat.

4. Once the thermostat reaches the set temperature the heater will automatically switch to LOW heat to save energy.

5. When the air temperature reaches 4o above the set temperature,
the heater will turn off. The Heater will cycle off and on in the LOW mode to maintain the set temperature.

All this happens automatically with Lasko Save-Smart®Technology. To deactivate the Save-Smart® function, press Save-Smart®
again or (hi/lo) for continuous high/low heat.



Lasko Ultra Ceramic Tower Heater Review with Remote Control


Pressing the Oscillation Button will allow the Heater to oscillate back and forth. To stop the oscillation, press the Oscillation Button  again. When the Heater is in Automatic Temperature Control, the oscillation function will stop when the set temperature is reached and resume when the Heater turns back on.



Lasko Ultra Ceramic Tower Heater Review with Remote Control: Model CT30710C



The automatic temperature function will only operate on “High” heat. You cannot set the temperature automatically when the unit is in the low heat mode.

  1. To set the room at a specific temperature press the ( ) or ( ) buttonsto the desired temperature. The display will now reflect the ( ) and the temperature will be flashing. The Heater is now in Auto Temperature Mode.
  2. When you reach the temperature at which you want to set the unit, the set temperature will flash several times and then the display will return to indicate the current room temperature and will gradually change as the room temperature changes. NOTE: the temperature display does not indicate the temperature of the heated air being emitted by the heater.
  3. Once the room temperature reaches 2 degrees above the set tem- perature, the Heater will shut off. Once the room temperature reaches 1 degree below the set temperature, the Heater will turn back on and continue to cycle off and on to maintain the set temperature.
  4. This function will cancel if the ( ) button is pressed. The Heater will now be in High heat and run continuously.

NOTE: It is normal for the Heater “fan” to run for approximately 15 seconds when the Heater shuts off after reaching the set temperature.




Lasko Ultra Ceramic Tower Heater



The timer function may be activated when the Heater display is in any function or speed. This function allows you to set the length of time the Heater will run before turning itself off, from 1 hour to 8 hours. Pressing the Timer Button will increase the length of time by 1 hour each time this button is pressed. After the display reflects 8 hours, pressing the Timer Button once more will reset the Heater to run continuously. The Heater will turn off when the set time has elapsed. The unit can be turned back on by pressing the Power Button.



Price and where to buy

The main places to buy it are from Amazon or Costco. We bought ours in store at Costco for $59.99 but as with anything at Costco, while stocks last, if you see it great, else you may need to look online. I can’t comment on other Lasko models, but so far I can recommend this model.

  1. Amazon 
  2. Costco Online $64.99
  3. Costco Inshore if you can find it $59.99





Overall I am satisfied with this unit. Time will tell if it will last the test of time. The remote is cool, the heater outputs decent heat to keep a large enclosed room warm enough. It is supplemental heat and shouldn’t be used as a primary heat source or in a commercial business where it is not built to last. It would do fine in small rooms or even in a garage or workshop at home. I can recommend this product as I own it and I will update my blog if I have to return the unit or it fails. It also comes with a nice glossy 1 page guide to get started which is rare to see now days which is a nice plus


Please go ahead and comment

I would love to hear from you and if I have missed anything, let me know and I will add it.


Best Wall-Mounted Panel Heaters 2017

What are Wall mounted Infrared heating panels?

Wall Mounted Heating Panels are flat panels that can be easily mounted on the ceiling or wall. An infrared heating panel looks like a flat screen. It is an electric heater that operates from a wall outlet. The difference with traditional electric heating is that infrared heating are way more efficient and enjoyable in terms of energy consumption and warmth. Infrared panels are relatively new and have been gaining popularity in the last recent years.


The main advantage is the reduced electricity cost. Depending on which model you get, they can use the equivalent of 2 lightbulbs (200W) up to 400-600W.

Wall mounted Infrared heating panels come in different sizes. Each have their own specific characteristics, power and energy consumption.

Wall panel electric heaters, or electric panel heaters use electricity to slowly heat a large surface (typically ceramic). They can either be portable or permanent fixtures, attached to a wall or even a ceiling. Electric wall panel heaters are suitable for use in smaller areas, but are considered fairly inefficient for central heating purposes.



How energy efficient are electric panel heaters?

Electric radiant panel heaters use less power and give out a less intense heat than some other portable electric heaters (like radiant bar heaters or convection fan heaters). As such they’re considered to be reasonably energy efficient as far as electric heaters go, using around 1/3 as much electricity as their radiant bar heating cousins. They are a little slower to heat up than some other electric heaters though, so aren’t necessarily as appropriate in places where heat is needed quickly and for relatively short amounts of time.

Are Panel heaters energy efficient ?

Flat-panel heaters are often promoted as ‘eco’ or cheap to run. However they produce very little heat – usually not enough to heat up a room to comfortable and healthy temperatures. A higher wattage heater controlled by a thermostat is usually a better alternative to panel heaters – you can turn off a higher wattage heater when you don’t need it and the heater will be able to heat up the room again within a reasonable time. A thermostat can cycle the heater on and off so you can maintain a comfortable temperature without wasting energy.

  • Low surface temperature – panel heaters usually don’t get hot enough for children or pets to burn themselves, but covering them with towels or clothes still poses a fire risk.
  • Can g=ke a very long time to heat up a cold room – because of their very low heat output.
  • Good for heating very small rooms continuously – like bathrooms or small studies. However, leaving the heater on when you’re not there will result in unnecessarily high power bills.
  • Often don’t have a thermostat.


Installation requirements

There aren’t many restrictions on where electric panel heaters can be installed or placed – in fact, the most you really need is a power point to plug them into, and perhaps some mounting brackets. These types of heaters can be installed in bathrooms (Read your heaters specifications, because some of them do recommend you do not install them in bathrooms), you need to ensure that you comply with the Building Code’s minimum clearance distances from water supplies (or further, if specified by the manufacturer). This is typically a separation of 60cm, but check with your local regulator for confirmation.


What could be the advantage of electric panel heaters then?

The big advantage of these heaters is that they are really flat and can be attached to a wall and therefore save space in your rooms. The primary utilisation of a flat heating system is to boost the heat in a room or just a specific area.

Many opportunities exist to boost the heat in your home without having a really expensive bill but unfortunately many of us are unaware of these cheaper alternatives. One option would be the wall mounted panel heaters.

This system of heating is ideal for both long and short term heating requirements. If one of your radiators is damaged or even if you don’t really want to use your favourite electric blanket, this is the perfect way to keep the warmth in your room as the electric panel heater can be utilised to compensate the loss of heat.

Where do I put it?

As wall panel electric heaters are lightweight and provide a very localised kind of heat, they are typically used in smaller areas, such as bathrooms. Because they are much more economical to run over the longer term than many other types of electric heaters, they are also ideal as clean, efficient space heaters in bedrooms, offices and studies. Try place it in the centre of the room if possible and most times it will probably be dictated by where you have a socket.


Radiant heaters

Bar heaters with glowing elements and a reflector are radiant heaters. They mainly heat objects and people rather than air in a room, and are available as either free-standing, wall or high-wall mounted models.

  • Good for rooms with high ceilings.
  • Good for large rooms where you only need to heat one area of the room.
  • Great for instant heat – rather than waiting for the air to warm up. For example in large bathrooms (only use high wall mounted models here), while standing at the kitchen sink or for that quick early morning breakfast in a cold house.
  • Not suitable for bedrooms – many emit some visible light and they can also be a fire risk.
  • Can be a fire risk and dangerous to children.
  • High-wall mounted models (available from electrical supply stores) can be installed out of children’s reach and away from flammable materials. They are also more effective than high-wall fan heaters in bathrooms, provided there is enough space for the required safety clearances.
  • Most don’t have a thermostat.




The important thing to understand about these heaters, it isn’t instant heat. It is not going to make a room instantly warm like a radiator heater would. It is designed to warm up a room slowly and keep it warm. They won’t do well it large rooms and in the dead of winter where it is very cold especially in areas where you get into below freezing temperatures. They are designed to keep a room comfortable vs very warm. The heaters do get warm to the touch, so if you able to put in near you such as by a desk or couch where you sit, then you should feel the heat and be kept warm. I have one in a large room but the room is downstairs so it retains heat quite well and I am happy with the heat that comes out of it. I would like it if it got warmer, but I opted for the 400W model and I am satisfied with the heat it outputs.


My office is 330 square feet or 30 square meters 22′ x 15′ and it keeps it comfortably warm. I have 2 large windows but the office is downstairs and retains heat relatively well. I have the 400W Model.


I have ordered a few more for upstairs, so I will see how well it does thru out the winter. I can recommend them as one of my main goals was to lower my electricity costs and they are more efficient from a electricity cost point of view.


Which Models do I recommend ?

There are 3 brands that come to my mind and I will list them in order of preference from my perspective


  • VonHaus (Well known and popular brand, but stocks seem less than other brands). Get this one if you can get your hands on one else the Econo-heat is just as fine, I have one and am happy with it.
  • Econo-heat (Well known brand). I can recommend this brand, I have one of these Units.
  • Amaze (These heaters can smell for the first week – They say the smell should reside in 24 hours, but my experience has been longer). That been said you can get some good deals on these heaters if you willing to withstand the smell for a longer period of time). I bought 1 of these units and I was impressed with the package presentation and the parts came including a placement cardboard cutout piece to help you place it on the wall, plus a heat resistant stick on cover to reflect the heat.


BONUS Tip: If you going to buy a thermostat, buy it separately, that way if you need to send the heater back, you don’t have to send the thermostat back as well and could use it for a different type of heater if you needed to. They tend to be a similar price if purchased separately or together.







Buy these separately if you can



Anself Themostat


Amaze Thermostat

Please go ahead and comment

I would love to hear from you and if I have missed anything, let me know and I will add it.