-
Replace in MySQL
A quick example of a SQL statement with REPLACE $query = ‘SELECT id FROM `user` WHERE email =”‘.$email.’” AND REPLACE(tel_1, ” “,”") = “‘.$phone.’” LIMIT 1′;
-
PHP Email Validation
Email validation is something that is needed in a variety of situations, but I’ve always struggled to find a good one…. Well, here are 2! The first is something I…
-
PHP Get Defined Vars
Ever wanted to see the variables in a page? Warning!! It’ll show all of them…. <?php print_r(get_defined_vars()); ?>
-
FW: PHP Logout
A good logout script is needed in most applications, and here’s the one I use. I have this script in a ‘config’ file that I call at the beginning of…
-
Great Hotspot Image Swap
Using ‘hotspots’ to swap images is pretty straight forward, and can be really effective…. try this method from Stackoverflow <img src=”nav.jpg” /> //set off state var nav_off = “/images/nav-off.jpg”; //…
-
FW: Fancybox
http://net.tutsplus.com/tutorials/wordpress/anatomy-of-a-wordpress-plugin/ http://wordpress.tv/2009/09/20/john-hawkins-plugin-building-portland09/ http://www.tipsandtricks-hq.com/wordpress-lightbox-ultimate-plugin-display-media-in-a-fancy-lightbox-overlay-3163
-
Javascript ‘Are You Sure?’ Message
This small but very handy piece of code… onclick=”javascript:return confirm(‘Are you sure you want to delete this?’)” For example: <input type=”submit” name=”button” value=”Delete Page” onclick=”javascript:return confirm(‘Are you sure you want…
-
htaccess 301 Redirect Guide
Handy guide from the team at Sitepoint… http://www.sitepoint.com/the-missing-guide-301-redirects-for-mac-and-pc/
-
Drupal 6 Set-up on Heart Internet
This is more for myself, but good if it helps someone else too…. This is a Drupal 6 (6.22) set-up on Heart Internet hosting (Reseller account). Once the hosting account…











