<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8819756027609406389</id><updated>2012-01-26T13:03:19.038Z</updated><category term='SagePay'/><category term='Scheduled MySQL Backups'/><category term='Microsoft'/><category term='tools'/><category term='MVC'/><category term='Lancashire'/><category term='SQL'/><category term='MySQL console'/><category term='web'/><category term='books'/><category term='web developers'/><category term='web applications'/><category term='web development'/><category term='CodeIgniter'/><category term='DATE_FORMAT WHERE'/><category term='functions'/><category term='e-shot design'/><category term='Apple'/><category term='Ajax'/><category term='PHP date'/><category term='Book Reviews'/><category term='beginners'/><category term='applications'/><category term='iphone'/><category term='DATETIME'/><category term='developers'/><category term='CRUD Generator'/><category term='PHP regex'/><category term='introduction to jQuery'/><category term='Yii'/><category term='script'/><category term='lawsuit'/><category term='XHTML'/><category term='c++'/><category term='learning'/><category term='website design'/><category term='Yahoo'/><category term='Facebook'/><category term='Cloud'/><category term='iphone Apps'/><category term='apache'/><category term='PHP Frameworks'/><category term='LAMP'/><category term='jQuery'/><category term='MySQL'/><category term='Online Applications'/><category term='dreamweaver'/><category term='CSS'/><category term='Search Engines'/><category term='arrays'/><category term='programming'/><category term='Suhosin'/><category term='Magento'/><category term='Microsoft Surface'/><category term='CodeIgniter Pagination'/><category term='Google'/><category term='databases'/><category term='PHP'/><category term='MySQL backups'/><category term='Bing'/><category term='SEO'/><category term='Linux'/><category term='HTML'/><category term='jQuery newbie'/><category term='OOP'/><category term='JavaScript'/><category term='database timestamp'/><category term='e-commerce'/><category term='CodeIgniter Tutorials'/><title type='text'>Freelance Web Developer In Lancashire and the Northwest</title><subtitle type='html'>Thoughts from a UK based PHP web developer based in and around Lancashire and Greater Manchester</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>42</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-2385933674260332333</id><published>2012-01-24T08:05:00.003Z</published><updated>2012-01-24T08:06:32.408Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='arrays'/><title type='text'>Turn a word into an array in PHP</title><content type='html'>Was mucking around with creating a little word game the other day and needed to turn a string in to an array, this is how it was done:&lt;br /&gt;&lt;br /&gt;$word = 'words';&lt;br /&gt;$len = strlen($word);&lt;br /&gt;$exploded_word = array();&lt;br /&gt;&lt;br /&gt;for($i = 0; $i &amp;lt; $len; $i++) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; $exploded_word[] = $word[$i];&lt;br /&gt;}&lt;br /&gt;&lt;div&gt;&lt;/div&gt;Would produce:&lt;br /&gt;&lt;pre&gt;Array&lt;br /&gt;(&lt;br /&gt;    [0] =&amp;gt; w&lt;br /&gt;    [1] =&amp;gt; o&lt;br /&gt;    [2] =&amp;gt; r&lt;br /&gt;    [3] =&amp;gt; d&lt;br /&gt;    [4] =&amp;gt; s&lt;br /&gt;)&lt;/pre&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-2385933674260332333?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/2385933674260332333/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2012/01/turn-word-into-array-in-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/2385933674260332333'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/2385933674260332333'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2012/01/turn-word-into-array-in-php.html' title='Turn a word into an array in PHP'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-5295508989119625381</id><published>2012-01-09T13:44:00.000Z</published><updated>2012-01-10T08:00:56.929Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Looping through select fields and getting the selected text using jQuery</title><content type='html'>I spent a little time wrestling with this and I thought it may come in useful to pop on to the blog. In my situation I had to loop through a number of select items as I needed to post some data. I needed to do this as I had to pass 3 sets of information from each select / drop down box. It had to be done this way because I was using the dropdown boxes for a number of different functions, some needed to pull the text and some needed to pull the value.&lt;ul&gt;&lt;li&gt;The name of the select box&lt;/li&gt;&lt;li&gt;The value of the select box&lt;/li&gt;&lt;li&gt;The text of the selected item&lt;/li&gt;&lt;/ul&gt;&lt;div class = "codeSnippet"&gt;$('select').each(function(){&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;var selected_text = $(this).children('option:selected').text();&lt;br /&gt;}) &lt;/div&gt;Happy programming :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-5295508989119625381?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/5295508989119625381/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2012/01/looping-through-select-fields-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/5295508989119625381'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/5295508989119625381'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2012/01/looping-through-select-fields-and.html' title='Looping through select fields and getting the selected text using jQuery'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-1857585867874502415</id><published>2012-01-05T08:55:00.002Z</published><updated>2012-01-07T14:12:55.984Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP date'/><title type='text'>Work out the days between two dates using PHP</title><content type='html'>I've popped this up as I needed to work out the number of dates in between two dates. Again something similar might be out there, but I thought it may be useful for any one out there that may need it.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Parameters&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;Required - date1 and date2: Dates in the following format&amp;nbsp;yyyy-mm-dd&lt;br /&gt;Optional - inclusive: If you set to true it includes the two provided dates in it's calculation&lt;br /&gt;Optional - return format of the dates: Combination of PHP's date formatting options&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Return Values&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Returns an array of dates and the number of days&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The Code&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codeSnippet"&gt;/** &lt;br /&gt;&amp;nbsp; &amp;nbsp; * Get the difference between two dates...&lt;br /&gt;&amp;nbsp; &amp;nbsp; * @param string $date1 yyyy-mm-dd&lt;br /&gt;&amp;nbsp; &amp;nbsp; * @param string $date2 yyyy-mm-dd&lt;br /&gt;&amp;nbsp; &amp;nbsp; * @param boolean $inclusive&lt;br /&gt;&amp;nbsp; &amp;nbsp; * @param string $return format&lt;br /&gt;&amp;nbsp; &amp;nbsp; *&lt;br /&gt;&amp;nbsp; &amp;nbsp; * @return array of total number of days and the dates in the prescribed format&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;function days_between($date1, $date2, $inclusive = true, $return_format = 'Y-m-d') {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $date_array = array();&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $output_array = array();&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $date1_ts = strtotime($date1);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $date2_ts = strtotime($date2);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $second_difference = $date2_ts-$date1_ts;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $num_days = floor($second_difference / 86400);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (is_numeric($num_days) &amp;amp;&amp;amp; $num_days &amp;gt; 0) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for ($i = 0; $i &amp;lt;= $num_days; $i++) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $new_day = $date1_ts + ($i*86400);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $date_array[] = date($return_format,$new_day);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!$inclusive) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; unset($date_array[0]);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; array_pop($date_array);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $output_array['number_of_days'] = sizeof($date_array);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $output_array['dates_between'] = $date_array; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return ($output_array);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;}&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;b&gt;Usage&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codeSnippet"&gt;days_between('2011-12-31', '2012-01-05', 1,'d M Y');&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-1857585867874502415?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/1857585867874502415/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2012/01/working-out-number-dates-in-between.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/1857585867874502415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/1857585867874502415'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2012/01/working-out-number-dates-in-between.html' title='Work out the days between two dates using PHP'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-3051778555111832291</id><published>2011-12-30T20:51:00.000Z</published><updated>2012-01-13T14:40:44.572Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='CodeIgniter'/><category scheme='http://www.blogger.com/atom/ns#' term='CodeIgniter Pagination'/><category scheme='http://www.blogger.com/atom/ns#' term='CodeIgniter Tutorials'/><title type='text'>Use search with Codeigniter pagination</title><content type='html'>Like I mentioned in a previous post, Codeigniter is extremely flexible and the following code is a perfect example of this. This post on &lt;a href="http://firmy007.blogspot.com/2011/12/using-search-parameters-with.html"&gt;using search with Codeigniter pagination&lt;/a&gt; uses only standard Codeigniter functions and requires no extra classes or functions.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Benefits to using this method&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;No need to use any caching to pass information across pages&lt;br /&gt;No need to use any&amp;nbsp;JavaScript / jQuery to amend links&lt;br /&gt;You can pass any number of parameters through the $_GET array - these may include number of links per page, result ordering information etc. as it rebuilds the URL at page load&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Downsides&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You are using GET which isn't really the Codeigniter way&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Notes on usage&lt;/b&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;This solution requires a form submitted through GET&lt;br /&gt;&lt;br /&gt;The beauty of this method is that it allows the programmer to use any number of form fields. There is no need to use a session cookie to keep track of what a user is searching for, it is all done through the $_GET array.&lt;br /&gt;&lt;br /&gt;The example uses some pretty standard stuff in terms of Codeigniter. I have called my model 'm_db_results', but that will probably be something completely different in your application. You could also improve the script by writing a better method for counting your results, I use this method for brevity only.&lt;br /&gt;&lt;br /&gt;For all other info or help, just follow the inline help :)&lt;br /&gt;&lt;br /&gt;&lt;div class="codeSnippet"&gt;public function search() {&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; $this-&amp;gt;load-&amp;gt;model('m_db_results'); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; $this-&amp;gt;load-&amp;gt;library('pagination');&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; //you can add any key =&amp;gt; value parameter to your base_url&lt;br /&gt;&amp;nbsp; &amp;nbsp; //it just needs one to create a well formed GET request&lt;br /&gt;&amp;nbsp; &amp;nbsp; $config['base_url'] = '/site/search/?search=true'; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; // as we are unsure as to what values are going to passed to your pagination page&lt;br /&gt;&amp;nbsp; &amp;nbsp; // we need to build the base url on the fly &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; foreach ($_GET as $key=&amp;gt;$value) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if ($key != 'search' &amp;amp;&amp;amp; $key != 'offset') {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$config['base_url'] .= '&amp;amp;'.$key.'='.$value;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; //this will need to go to a model method which determines the total number of results&lt;br /&gt;&amp;nbsp; &amp;nbsp; //based on your form/search parameters. In my case the model method takes an array which in this case&lt;br /&gt;&amp;nbsp; &amp;nbsp; //is based on&amp;nbsp;key/value pairs that are same mapped the same as the form inputs&lt;br /&gt;&amp;nbsp; &amp;nbsp; $results_info = $this-&amp;gt;m_db_results-&amp;gt;search($_GET);&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; //the key to using this is that it will append your uri with the query string segment parameter&lt;br /&gt;&amp;nbsp; &amp;nbsp; //using this allows in conjunction with the&amp;nbsp;$config['page_query_string'] being set to true&lt;br /&gt;&amp;nbsp; &amp;nbsp; //as it adds the offset to the URI as &amp;amp;offset=x&lt;br /&gt;&amp;nbsp; &amp;nbsp; $config['query_string_segment'] = 'offset';&lt;br /&gt;&amp;nbsp; &amp;nbsp; $config['page_query_string'] = true;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; $config['total_rows'] = count($results_info);&lt;br /&gt;&amp;nbsp; &amp;nbsp; $config['per_page'] = $number_per_page = 10;&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; //now instead of using the uri segment to determine the number of results we offset&lt;br /&gt;&amp;nbsp; &amp;nbsp; //from our results we use the parameter we specified above in the $config['query_string_segment'] &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; if (!empty($_GET['offset'])) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$offset = $_GET['offset'];&lt;br /&gt;&amp;nbsp; &amp;nbsp; } else {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$offset = 0;&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;$this-&amp;gt;pagination-&amp;gt;initialize($config);&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; //now we run the same method as above but we supply an amount of results we want to be returned and the offset&lt;br /&gt;&amp;nbsp; &amp;nbsp; //as the second and third parameters&lt;br /&gt;&amp;nbsp; &amp;nbsp; //and pass off the data to our view&lt;br /&gt;&amp;nbsp; &amp;nbsp; $data['results'] = $this-&amp;gt;m_db_results-&amp;gt;search($_GET, $number_per_page, $offset);&lt;br /&gt;&amp;nbsp; &amp;nbsp; $this-&amp;gt;load-&amp;gt;view('results-page.php', $data);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;Further info&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Now as your form is submitted through get, it will not be able to use the set_value() method if you normally use that to repopulate your forms. You will have to code it in yourself, more than likely using isset() or empty() to determine if the field has a value.&lt;br /&gt;&lt;br /&gt;P.S. If you found this post useful or not, can you leave some feedback in the comments as I want to improve the code as much as I can for other 'igniter fans. Thanks&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-3051778555111832291?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/3051778555111832291/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2011/12/using-search-parameters-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/3051778555111832291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/3051778555111832291'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2011/12/using-search-parameters-with.html' title='Use search with Codeigniter pagination'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-7467785402221707053</id><published>2011-11-19T10:56:00.001Z</published><updated>2011-12-01T06:53:41.952Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='MySQL backups'/><title type='text'>Using PHP to backup an entire MySQL server</title><content type='html'>This post can be used as a free way to use &lt;b&gt;PHP to backup your MySQL server&lt;/b&gt;. The code below comes from a script I developed so that we could back up the server with the execution of a single PHP page. Due to the way the script works, it passes off most of the heavy lifting to the system using &lt;span class="Apple-style-span" style="color: red;"&gt;exec()&lt;/span&gt;&amp;nbsp;function so that it doesn't have to run through the webserver. It does this by using the mysqldump client program that is installed on the MySQL server - The PHP script is just used as a trigger. This is especially helpful if a non-technical person needs to run a database backup, yet doesn't know how to use console commands.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A few notes:&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Each database is backed up in to it's own file and zipped up using gzip - make sure you have it installed. If not, you can always remove the zip command.&amp;nbsp;&lt;/li&gt;&lt;li&gt;The database script also adds the date to the file name&lt;/li&gt;&lt;li&gt;If you do not want to backup the entire database, just alter the &lt;i&gt;database_list&lt;/i&gt;&amp;nbsp;array with the names of the databases you want to backup, i.e.&lt;/li&gt;&lt;/ul&gt;&lt;blockquote class="tr_bq"&gt;$database_list = array('database_1', 'database_2');&lt;/blockquote&gt;&lt;b&gt;Usage:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;To use the script, all you have to do is modify the connection variables at the top and make sure your dump folder has the correct permissions.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;I List databases using a little bit of PHP and add them to an array&lt;/li&gt;&lt;li&gt;Loop through the databases&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;b&gt;The script:&lt;/b&gt;&lt;/div&gt;&lt;blockquote class="tr_bq"&gt;&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;set_time_limit(0);&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;$username = 'username';&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;$password = 'password';&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;$host = 'localhost';&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;/**&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;* Put your path here - Can be any valid path, but remember that you must have write permission on the folder&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;*/&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;$dump_path = './dumps/';&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;$dbc = mysqli_connect($host,$username,$password);&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;$result = mysqli_query($dbc,'SHOW DATABASES');&amp;nbsp;&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;$database_list = array();&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;while($row = mysqli_fetch_array($result)) {&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;&amp;nbsp; &amp;nbsp;$database_list[] = $row['Database'];&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;}&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;foreach ($database_list as $database) {&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;&amp;nbsp; &amp;nbsp; $dump_name = $database.'_'.date('d-m-y');&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;&amp;nbsp; &amp;nbsp; $dump_string = 'mysqldump --host '.$host.' --user='.$username.' --password='.$password.' '.$database.' &amp;gt; '.$dump_path.$dump_name.'.sql';&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;&amp;nbsp; &amp;nbsp; exec($dump_string);&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;&amp;nbsp; &amp;nbsp; $zip_cmd = 'gzip '.$dump_path.$dump_name.'.sql';&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;&amp;nbsp; &amp;nbsp; exec ($zip_cmd );&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;}&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;mysqli_close($dbc);&lt;/blockquote&gt;&lt;b&gt;Download&lt;/b&gt;&lt;br /&gt;If you would like to download the script, you may get it &lt;a href="http://www.thefirmy.co.uk/files/script.zip"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Expansion&lt;/b&gt;&lt;br /&gt;Another one of the benefits of using the exec() function is that it can easily adapted to perform scheduled, reliable backups using a CRON job. This is one of the reasons I used the date() function to append the backup name, so that you could have more than copy of the database in the same directory. One further modification to the script you could perform is to sub&amp;nbsp;categorise&amp;nbsp;your database backups so that they are easier to manage.&lt;br /&gt;&lt;br /&gt;James&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-7467785402221707053?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/7467785402221707053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2011/11/using-php-to-backup-entire-mysql-server.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/7467785402221707053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/7467785402221707053'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2011/11/using-php-to-backup-entire-mysql-server.html' title='Using PHP to backup an entire MySQL server'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-5144941805219620384</id><published>2011-11-19T10:19:00.001Z</published><updated>2011-11-19T20:12:54.190Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><category scheme='http://www.blogger.com/atom/ns#' term='MySQL console'/><title type='text'>Everyday MySQL console commands and MySQL hints</title><content type='html'>PHPMyAdmin is a great tool, but due its web based nature it can sometimes fall a little short, especially when dealing with large amounts of data. Don't get me wrong, it's still very useful for browsing large data sets, but if you are looking to do imports, exports, adding indexes etc., then you really need to use the console or some other application.&lt;br /&gt;&lt;br /&gt;To be honest, most of the commands here, you will find on many other websites, I just wanted to compile this list as a reference:All the following commands were ran using the console in BASH, but should work on Windows/Mac consoles.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Logging in with a supplied username and using password option:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;mysql --user=your_username -p&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Logging in with a supplied username and a supplied password:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;mysql --user=your_username --password=your_password&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Logging in to a different host with a supplied username and password:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;mysql --host &amp;nbsp;host_address --user=your_username --password=your_password&lt;br /&gt;&lt;br /&gt;&lt;b&gt;List databases&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;SHOW DATABASES;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Select a table&lt;/b&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;USE table_name;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Add an index&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;When you have a million plus records, this can save so much time in your lookups. I had a table that 1.5 million records, using a single WHERE clause on a non-index field was taking around 1.9 seconds, adding an index reduced the time to 0.0005 seconds:&lt;br /&gt;&lt;br /&gt;ALTER TABLE table_name add index (column_name);&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Export a database to a file:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;mysqldump --user=your_username --password=your_password database_name &amp;gt; name_and_path_of_sql_file_to_create.sql&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Will use a modification of the above to show how you can use PHP to backup an entire database in a future post - you can read that here: &lt;a href="http://firmy007.blogspot.com/2011/11/using-php-to-backup-entire-mysql-server.html"&gt;backup up your MySQL server with PHP&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Import a database on to a different host&amp;nbsp;&lt;/b&gt;&lt;b&gt;with a supplied username and password:&lt;/b&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;mysql --host&amp;nbsp;host_address&amp;nbsp;--user=your_username&amp;nbsp;--password=your_password&amp;nbsp;db_name &amp;lt; your_sql_file.sql&lt;br /&gt;&lt;br /&gt;Hope this is of use to you.&lt;br /&gt;&lt;br /&gt;James&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-5144941805219620384?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/5144941805219620384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2011/11/everyday-mysql-console-commands-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/5144941805219620384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/5144941805219620384'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2011/11/everyday-mysql-console-commands-and.html' title='Everyday MySQL console commands and MySQL hints'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-1953335157415151005</id><published>2011-08-28T11:31:00.005+01:00</published><updated>2011-08-28T11:49:51.430+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SagePay'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='LAMP'/><category scheme='http://www.blogger.com/atom/ns#' term='Suhosin'/><title type='text'>Sage Pay Success URI Crypt Length Problems</title><content type='html'>I have just looking at sage pay form integration and I came across a little problem with success part of the process.&lt;br /&gt;&lt;br /&gt;This is how the sage pay flow works:&lt;br /&gt;&lt;br /&gt;1. Server sends transaction details and user along to their server for payment.&lt;br /&gt;2. Server authenticates payment and sends back the user to a page you specified in your crypt field in step 1.&lt;br /&gt;3. At this point the payer should be at this point:&lt;br /&gt;&lt;br /&gt;http://test.com/success.php?crypt=&lt;span style="font-weight:bold;"&gt;stringToBeDecrypted&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In my case &lt;span style="font-weight:bold;"&gt;stringToBeDecrypted&lt;/span&gt; was 640 characters long and posed a little problem. In my case the string was showing as empty, yet when I ran the same URI on my test server it worked no problem. An investigation was necessary...&lt;br /&gt;&lt;br /&gt;It turns out it is to do with Suhosin security patch that many LAMP installations come with and one of it's directives:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;suhosin.get.max_value_length&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To check your value, just run PHP info and look under your Suhosin section, the value you will probably see is 512 (as this is the default). You will need to change to a figure of at least 640 for your SagePay confirmation page to run. If you have root access to the system then follow the instructions here on how to change the values:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://solidservers.ca/2008/06/suhosin-changing-configuration-values/"&gt;http://solidservers.ca/2008/06/suhosin-changing-configuration-values/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Otherwise contact the server administrators and ask them to change it on your behalf.&lt;br /&gt;&lt;br /&gt;Firms&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-1953335157415151005?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/1953335157415151005/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2011/08/sage-pay-success-uri-crypt-length.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/1953335157415151005'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/1953335157415151005'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2011/08/sage-pay-success-uri-crypt-length.html' title='Sage Pay Success URI Crypt Length Problems'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-8465395067273744230</id><published>2011-06-01T13:01:00.010+01:00</published><updated>2011-06-08T20:57:58.271+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Frameworks'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='CodeIgniter'/><category scheme='http://www.blogger.com/atom/ns#' term='CRUD Generator'/><category scheme='http://www.blogger.com/atom/ns#' term='Yii'/><title type='text'>Codeigniter Versus Yii - my thoughts</title><content type='html'>Codeigniter versus Yii, now this may open a real can of worms, as most comparisons do, but I have used both and have to come to the conclusion that whilst Yii is probably that slightly more polished, Codeigniter is going to be my framework of choice for next few years to come when developing websites in PHP.&lt;br /&gt;&lt;br /&gt;Let's take a look at Codeigniter, it's easy to learn, easy to grasp and now that it has been upgraded to version PHP5 only from version 2 onwards, much more future proof. I also really like the way that you can really, really customise it to do your bidding. No need to use the command line to get it up and running and it will run with a very small footprint. You can also cache the hell the out of it at multiple levels to squeeze every little bit of performance out of it, take a &lt;a href="http://www.haughin.com/2008/02/13/optimizing-and-scaling-your-codeigniter-application/"&gt;look here&lt;/a&gt; for a detailed look at this.&lt;br /&gt;&lt;br /&gt;Now let's look at Yii, completely object oriented and its major, major advantage - The CRUD generator. My goodness, this saves you time, lots of time. You create your database, design your schema and bang the Gii tool produces (as if by magic :)) your create, read, update and delete pages. No mucking around no writing SQL, it's all done through the (Rails inspired) Active Record Pattern - it's fair to say I fell in love with this almost straight away, I couldn't believe how easy it was to create this code. And this is what got me thinking...&lt;br /&gt;&lt;br /&gt;I like Codeigniter for its flexibility, the way you could use both an active record pattern or traditional SQL, You could keep your database results in arrays or as standards objects, they leave it up to you. But I wanted, no, no... I needed a CRUD generator after experiencing the wonders of the Gii tool. As a &lt;a href="http://www.thefirmy.co.uk/"&gt;freelance web developer in Lancashire&lt;/a&gt; (I know this sounds cheesy) time is money, so I scoured the web for one and I found a couple out there and none really lived up to my expectations, one was particularly good, but didn't really suit my needs. Like I said, I liked Codeigniter because of its flexibility, so I decided to bite the built and create my own &lt;span style="font-weight:bold;"&gt;CRUD generator for Codeigniter&lt;/span&gt;. Yeah, sure it was going to take a little bit of development time, but the time saved will definitely outweigh the initial outlay and it does, plus as my CRUD tool was my own, I could tweak and make changes very easily. Now, when creating large projects, creating new sections is not the chore it once was and now leaves me more time to make the other, more unique features, just right. &lt;br /&gt;&lt;br /&gt;The main point that many people raise when they compare the two frameworks is the way that Codeigniter is not truly object oriented, whilst Yii is much more pure in its implementation. I suppose this is true, but when I create applications that are large, I need to know that I can hack away at them very easily and tune them to my specific needs and it is for this reason above all else that Codeigniter remains my PHP framework of choice.&lt;br /&gt;&lt;br /&gt;When I first set out developing websites using PHP, I though this was the language I would use forever when it came developing websites. I als felt like I would never, ever use a framework as how could using some else's ideas and code be of any benefit to me, when I have wrote my own application. Not only is the code battle ready as it has been through countless improvements through being used in the community, it also oipens up your mind to new ways of thinking. I learnt to use Codeigniter first and Yii second, but there are things used in Yii, that I will and have ported over in to Codeigniter, the way Yii authenticates users for example, is a great way of accomplishing this task.&lt;br /&gt;&lt;br /&gt;It's like I have mentioned before in other posts, do not do what other people tell you should do. Sure take on board what other people have, but stick to what you are comfortable with using as it is you that is creating the application and not them.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-8465395067273744230?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/8465395067273744230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2011/06/codeigniter-versus-yii-my-thoughts.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/8465395067273744230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/8465395067273744230'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2011/06/codeigniter-versus-yii-my-thoughts.html' title='Codeigniter Versus Yii - my thoughts'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-3803952633807549075</id><published>2011-03-06T20:38:00.002Z</published><updated>2011-03-06T20:45:15.677Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Frameworks'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='CodeIgniter'/><title type='text'>Phew, how busy...</title><content type='html'>Very, very busy at the moment. Along with the welcomed addition of my little daughter O have websites coming out of my ears.&lt;br /&gt;&lt;br /&gt;Anyhow. I have launched a couple of mini sites this weekend. One named &lt;a href="http://www.man-of-steel.co.uk"&gt;Man of Steel&lt;/a&gt; for myself as I like to archive information about the new Superman movie. I am sure there are hundreds of other sites out there, but it is mainly for me so I can go back and look at how the movie shaped up over time. As you may guess I am a huge Superman fan and I can't wait see what Zack Snyder does with the franchise.&lt;br /&gt;&lt;br /&gt;The other is a hobby site for a friend of mine, named the &lt;a href="http://www.pensionersvoice.co.uk/"&gt;Pensioner's Voice&lt;/a&gt;. This was a a favour, has very little design, but the information is incredibly useful.&lt;br /&gt;&lt;br /&gt;Oh in terms, of technical information, they were both built using the PHP Codeigniter Franmework version 1.7 using a MySQL 5 database.&lt;br /&gt;&lt;br /&gt;All the best,&lt;br /&gt;James&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-3803952633807549075?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/3803952633807549075/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2011/03/phew-how-busy.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/3803952633807549075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/3803952633807549075'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2011/03/phew-how-busy.html' title='Phew, how busy...'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-1249263728487378591</id><published>2011-01-10T20:14:00.004Z</published><updated>2011-01-11T08:44:18.651Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Frameworks'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='CodeIgniter'/><title type='text'>Organise controllers in Codeigniter using subfolders</title><content type='html'>This is my extended guide to using folders in Codeigniter. There are a couple of guides out there, but I thought a more detailed with step by step guides. &lt;br /&gt;&lt;br /&gt;In this instance I will be creating a very common controller named 'Admin' with a basic controller named 'login' within a folder named 'secure' - its URI will look like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;http://www.domain.com/secure/admin/login&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;First, go to your 'Controllers' Folder&lt;br /&gt;Then add a folder named 'secure' - this will contain your new set of controllers.&lt;br /&gt;We then create a file within the new folder named 'admin.php' - the new controller file&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Declare your subclass:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codeSnippet"&gt;&amp;lt;?php&lt;br /&gt;&lt;div class="indented"&gt;class admin extends Controller {&lt;br /&gt;&lt;div class="indented"&gt;&lt;br /&gt;function __construct() {&lt;br /&gt;&lt;div class="indented"&gt;parent::Controller();&lt;/div&gt;}&lt;br /&gt;&lt;br /&gt;function login() {&lt;br /&gt;&lt;div class="indented"&gt;//your code to go here&lt;/div&gt;}&lt;/div&gt;  &lt;br /&gt;}&lt;/div&gt;?&amp;gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Adding a default&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When you add a controller folder, you can also add in the default controller to run should the person viewing the site not enter a controller name, for example:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;http://www.domain.com/secure/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You add the default like so:&lt;br /&gt;&lt;br /&gt;Create a new file and name it the same as your default controller name in 'routes.php', the default controller in Codeigniter is 'welcome', so that is what we will create:&lt;br /&gt;&lt;br /&gt;controllers/secure/welcome.php&lt;br /&gt;&lt;br /&gt;We then need to create the code for this file:&lt;br /&gt;&lt;br /&gt;&lt;div class="codeSnippet"&gt;class welcome extends Controller {    &lt;br /&gt; &lt;br /&gt;&lt;div class="indented"&gt;function __construct() {&lt;br /&gt;&lt;div class="indented"&gt;parent::Controller();&lt;/div&gt;}&lt;/div&gt;&lt;br /&gt;&lt;div class="indented"&gt;function index() {&lt;br /&gt;&lt;div class="indented"&gt;//your code to go here&lt;/div&gt;}&lt;/div&gt;       &lt;br /&gt;}&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;For more information on Codeigniter and how Controllers work within go to:&lt;a href="http://codeigniter.com/user_guide/general/controllers.html"&gt;http://codeigniter.com/user_guide/general/controllers.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-1249263728487378591?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/1249263728487378591/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2011/01/organise-controllers-in-codeigniter.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/1249263728487378591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/1249263728487378591'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2011/01/organise-controllers-in-codeigniter.html' title='Organise controllers in Codeigniter using subfolders'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-6712179725676955344</id><published>2010-12-24T10:17:00.021Z</published><updated>2011-01-08T12:24:25.355Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Frameworks'/><category scheme='http://www.blogger.com/atom/ns#' term='web development'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>The Flexibility of PHP</title><content type='html'>I have been using PHP for 4 years now and I like to think I know it pretty well by now. It's a great language, it is open source, has regular updates and fixes, and has a great online manual.&lt;br /&gt;&lt;br /&gt;What you also get when you talk to other developers who use other technologies is that it is non-complied and uses the 'Spaghetti' coding style where you have SQL in with your code, along with the formatting of the results returned from the database and all your HTML.&lt;br /&gt;&lt;br /&gt;Well, for them and other people who are looking to learn a Server side Web Programming language, PHP is not sub standard, &lt;span style="font-weight:bold;"&gt;PHP is flexible&lt;/span&gt; - let me explain. People are also under the opinion that PHP is an easier language to learn than many other languages and yes it can be, but only because it is flexible and allows you to explore it from a number of different angles.&lt;br /&gt;&lt;br /&gt;First, let's take a look at the 'Spaghetti' option, yes it is a little in efficient and yes it CAN be hard to edit if you have to come back to it in the future. But if you are new to programming and web development then it is the perfect way to start. You can learn the other (multi-tier) methods when you feel a little more comfortable. When you first learn to program, learning using a procedural manner is a great way to learn a language, the way it behaves and how logic determines specific conditions. Once you have these skills mastered, you can then start to apply them to more advanced methods, i.e. Object Oriented Programming.&lt;br /&gt;&lt;br /&gt;For those who have never seen a bit of PHP 'Spaghetti' Code it looks a little like this:&lt;br /&gt;&lt;br /&gt;&amp;lt?php&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $SQL = "SELECT field1 FROM table";  &lt;br /&gt;  &amp;nbsp;&amp;nbsp;&amp;nbsp; $query= mysqli_query($databaseLink,$SQL);&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&amp;nbsp; while($row = mysqli_fetch_array($query,MYSQL_ASSOC)) {&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo '&amp;lt;div class="tableResult"&amp;gt;'.$row['field1'].'&amp;lt;/div&amp;gt;';&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;br /&gt;The other option is to use a multi-tiered approach which could use Object Oriented Methods. When you use this approach, it works around the basis of separating code into different sections. When I first learnt OOP I used a two tier approach as I was a freelance developer and as such I thought that it was the best way to go. My two tier approach could very be different from another developer's 2 tier approach, but again, this is the flexibility of PHP. My 2 approach worked on the basis of keeping my Application Logic and my presentation in 1 tier and my business and data logic in another tier. When I created an application, I would follow this method and it served me well, across numerous (and large) applications. If I wanted to use a class, I would invoke it in the logic based file, the results would be sent back and the logic based file would process, format and output the results. The next example uses a separate database class but premise is the same, that the database and application classes from the controller or or input decision file.&lt;br /&gt;&lt;br /&gt;&lt;div class="codeSnippet"&gt;//database class&lt;br /&gt;class database {&lt;br /&gt;&lt;div class="indented"&gt;public function retrieveResults ($SQL) {&lt;br /&gt;&lt;div class="indented"&gt;$rows = array();&lt;br /&gt;$query= mysqli_query($database,$SQL);   &lt;br /&gt;while($row = mysqli_fetch_array($query,MYSQL_ASSOC)) {&lt;br /&gt;$rows[] = $row;&lt;br /&gt;}&lt;br /&gt;return $rows;&lt;/div&gt;}&lt;/div&gt;}&lt;/div&gt;&lt;br /&gt;&lt;div class="codeSnippet"&gt;//application class&lt;br /&gt;class application {&lt;br /&gt;&lt;div class="indented"&gt;public function getTableData() {&lt;br /&gt;&lt;div class="indented"&gt;$SQL = "SELECT field1 FROM table";&lt;br /&gt;$useDatabaseClass = new database();&lt;br /&gt;$results = $useDatabaseClass-&gt;retrieveResults($SQL);&lt;br /&gt;return ($results);&lt;/div&gt;}&lt;/div&gt;}&lt;/div&gt;&lt;br /&gt;&lt;div class="codeSnippet"&gt;//calling script&lt;br /&gt;$useApplication = new application();&lt;br /&gt;$getData = $useApplication-&gt;getTableData();&lt;/div&gt; &lt;br /&gt;&lt;div class="codeSnippet"&gt;foreach ($getData as $row) {&lt;br /&gt;&lt;div class="indented"&gt;echo '&amp;lt;div class="tableResult"&amp;gt;'.$row['field1'].'&amp;lt;/div&amp;gt;';&lt;/div&gt;}&lt;/div&gt;&lt;br /&gt;Then there is the 3 tier approach - one popular name for it is the MVC approach. This is where you separate application logic, data handling and presentation in to their three separate components. This is useful to use when you on any project, but I found it of most useful since I have been working in a design agency, as I work on multiple projects on any one time and front end guys who work there need to access many of the view files. Please note that the way you call scripts in reality would probably not look like the above, these are just for illustration purposes. In reality, if you use an MVC framework or you create your own, you would more likely &lt;span style="font-weight:bold;"&gt;extend&lt;/span&gt; your base classes rather invoking them using the &lt;span style="font-weight:bold;"&gt;new&lt;/span&gt; keyword.&lt;br /&gt;&lt;br /&gt;The three tier is very similar to the two tier approach. Except that the &lt;span style="font-weight:bold;"&gt;$getData&lt;/span&gt; array is passed through to another file which outputs the results using the foreach loop. That's it, the hard work is really done when you move from one tier to two tiers, the third tier (the view tier) is really just a minor extension of the controller tier, which in my opinion works in tandem with the Model or Business Tier. The view or presentation file can be loaded in a number of ways, using include() or require() or even eval().&lt;br /&gt;&lt;br /&gt;A few last words, when you start down your PHP developer career, do not let anyone tell you which method to use, weigh up the situation and make an informed decision. I like to build my online applications using 3 tiers using codeigniter as the MVC framework, but I still write single standalone scripts when I feel the situation needs it&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-6712179725676955344?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/6712179725676955344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2010/10/flexibility-of-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/6712179725676955344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/6712179725676955344'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2010/10/flexibility-of-php.html' title='The Flexibility of PHP'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-7997966892550019005</id><published>2010-12-10T10:07:00.003Z</published><updated>2010-12-14T11:04:48.826Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Frameworks'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='MVC'/><title type='text'>Building websites using MVC in PHP</title><content type='html'>When you start PHP programming you can write some code very quickly and get some very good results very quickly. Quick as a flash you can learn the syntax in a few weeks (especially if you know another language) and in week 3, you can have a dynamic website spitting out information in a variety of ways. That's fine and it CAN serve you well, but it has its problems: scalability, readability and edit-ability (and many other 'abilities) all become increasingly hard to maintain.&lt;br /&gt;&lt;br /&gt;When you learn a language, you don't become proficient in it over night, you have to use the language for months and even years before you come to real grips with it. Each language has its own set of intricacies, pitfalls and glitches that set it aside from its peers.&lt;br /&gt;&lt;br /&gt;Even when you crack a language, there are number of different ways you can set your site's architecture. For example I went through these stages (and many in between)&lt;br /&gt;&lt;br /&gt;Writing pure procedural code was the method I originally. With the odd exception of including the footer, header and my functions file, I was writing code per dynamic page, top down in a procedural manner and I thought great, we have a site and it works pretty well.&lt;br /&gt;&lt;br /&gt;I then started to learn more advanced functions, using mod-rewrite to route requests and various other little tools that all made my life a little bit easier. With each passing stage, you look at your code and you honestly think that each iteration is the best you could ever do. That is until you move in to the next stage of your development where you try something new or read about some new fad sweeping the world of programming.&lt;br /&gt;&lt;br /&gt;The next stage was learning, using and creating classes to use in Object Oriented Programming (OOP). When I started using OOP I was astounded how much time I was saving when moving from project to project. I had created a database abstraction layer, form builder class, email class, social media class and many, many more that could be used in all my different projects. Again this method was great, I was a lone developer in the agency I worked for and any changes that needed to be made to the code could be done by myself, no problem. As I became a better developer over time I started to hone my scripts and use different folders to separate sections of the websites architecture and things became a little easier to manage. The problem I think came down to me working on my own when it came to the development side. I was using classes and objects but I was still passing SQL from within the page to the database and letting the same page then take those results and outputting the findings. It was at this point I turned to Ruby on Rails and learnt how to make a basic website using Ruby and things became a whole lot clearer. It showed me a structure of how a web site should be built and really opened my eyes to the MVC design pattern. I also realised that what could be done with Rails could surely be done with PHP.&lt;br /&gt;&lt;br /&gt;Once I decided that I was I going to use an MVC framework I needed to decide which one to use and after a little bit of reading I made the decision to use Codeigniter and bought a book on the subject. I built a couple of quick sites and decided that I absolutely loved it and that site and application builds were quicker and much easier to maintain. However  I also found myself to have a nagging issue. How did this wonderful thing work, so I took it upon myself to write my own little framework. It was a little bit daunting, but I had my own set of classes which I could integrate which and separating the page requests as per the MVC model. You could say that why create your own MVC framework when there are so many available ones out there? Well, it gives you a great understanding of the MVC model and as you are making something that is comparable to the big wigs in the PHP world like Zend and CakePHP (though may be not as substantial) then you can consider the creation as a sort of rite of passage as a developer.&lt;br /&gt;&lt;br /&gt;I am not going to go in to massive detail when it comes to building how you you build your own MVC framework but it runs along these lines:&lt;br /&gt;&lt;br /&gt;1. Create a rewrite condition in your .htaccess file that routes all requests bar images, css, js to a PHP file (which is generally known as a bootstrap file)&lt;br /&gt;2. Use a bootstrap file to separate your page request in to 2 basic sections. In my case I took the $_SERVER['REQUEST_URI'] value, used explode() on the '/' character and then accessed using $array[0] and $array[1] to access necessary parts of the URL. When this is done you will take an example like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;http://www.domain.com/products/widgets&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Which when broken down would be pointing to a controller named 'products' and and an action named 'widgets'. Once you have these two sections you can start using autoload to start using files automagically which will include your controllers and actions and calls to your views where data can be passed through to be outputted using HTML.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;On to the benefits of using an MVC Framework in PHP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You will find numerous &lt;a href="http://www.google.com/search?aq=f&amp;amp;sourceid=chrome&amp;amp;ie=UTF-8&amp;amp;q=benefits+of+using+mvc" target= "_blank"&gt;pages&lt;/a&gt; on the web regarding the benefits to the MVC. I will add the obvious ones and then a few more of my own. With MVC it helps you build sites in team by allowing multiple people or groups access to specific sections of code. You keep all your presentation, application, data handling code separate. Here are a couple more that, while are probably a little less grandiose will still help when it comes to creating your projects and are some of the major benefits that I have found.&lt;br /&gt;&lt;br /&gt;I use a PHP IDE named PHPEd and it works really well with both HTML, PHP and CSS. When using the MVC method I refound that I needed to come in and out my PHP and HTML. It makes it much easier to read and with a flick of a button in PHPEd (F12) you can quickly get an overview of all your PHP and HTML separated out. Front end developers can go in, add their elements and nothing is affected (this comes back to the coding in sections) and everyone is happy.&lt;br /&gt;&lt;br /&gt;Code becomes more modular, not only does it make it easier to use in other projects. For example, lets take an FAQ section. Lots of sites will use something like this, why completely rewrite for each site. Copy, Paste, Tweek and your done.&lt;br /&gt;&lt;br /&gt;When you need to find some code, you always no where it is. The URL tells you where the code is. I work in Digital Agency and I am constantly working on numerous sites and finding code use to be a real pain. All I can say is: it's much easier now!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-7997966892550019005?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/7997966892550019005/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2010/12/building-websites-using-mvc-in-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/7997966892550019005'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/7997966892550019005'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2010/12/building-websites-using-mvc-in-php.html' title='Building websites using MVC in PHP'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-274900043344837204</id><published>2010-11-24T21:00:00.003Z</published><updated>2010-11-26T08:11:00.806Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Frameworks'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='CodeIgniter'/><category scheme='http://www.blogger.com/atom/ns#' term='Book Reviews'/><title type='text'>Book Review of Professional Codeigniter - Wrox Publishing</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Author:&lt;/span&gt; Thomas Myer&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;First Published:&lt;/span&gt; 2008&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Pages:&lt;/span&gt; 314&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Purchased From:&lt;/span&gt; &lt;a target="_blank" rel="nofollow" href="http://www.amazon.co.uk/"&gt;amazon.co.uk&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;ISBN:&lt;/span&gt; 978-0470282458&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Skill Level:&lt;/span&gt; Intermediate to Advanced&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Categories:&lt;/span&gt; PHP, PHP Frameworks, Programming, Technical&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Reason for purchasing book:&lt;/span&gt;&lt;br /&gt;I had been playing around with my own MVC design pattern in PHP for a while and decided that it was time to learn a framework. After looking at the various ones out there, I decided that codeigniter would be the [first] one for me. I chose 'Professional Codeigniter' as the title suggests (and having bought other Wrox Books) that it is aimed at people who have moved past being a 'Beginner'.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Initial Thoughts&lt;/span&gt;&lt;br /&gt;The book starts off with a little introduction about the author and many of the other things that you would normally find at the beginning of a book.&lt;br /&gt;&lt;br /&gt;He also explains in detail why he started using the framework in the first place. This was very much welcomed as you can see that Thomas Myer was indeed a programmer who had a real need for using the framework, rather than just being another author who saw an opportunity to make some money from creating a book.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Structure&lt;/span&gt;&lt;br /&gt;One of the stand out features of this book is the way the order of each section is delivered to you. First we have an introduction to the world of MVC and why it is such a great design pattern. For those who have never used the MVC, this section is a great introduction, is written well and will bring many a coder up to speed in a short amount of time. This is mainly achieved by looking at older coding styles and how they lack structure of a real design pattern. He also looks at other PHP frameworks so that you understand how each one works and why Codeigniter is such a good choice. We then get on to the main part of the site and how to build a website (specifically an ecommerce website) using Codeigniter and it does this very well, taking you from the early stages right of concept creation and customer meetings right through to the delivery.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Technical Considerations&lt;/span&gt;&lt;br /&gt;Part of modern web design and development now focuses on an Agile Methodology, whereby software is created in small manageable sections using teams. This section is also explained very well, so if this concept is something that is new to you or you need certain points clarifying.&lt;br /&gt;&lt;br /&gt;Something else I should point out is that this book really could be split in to three separate sections. From chapters 1-4 you are giving a great deal information on how to use Codeigniter to create a website and how to get it working. Chapters 5-8 are more along the lines of adding the ecommerce sections and finally chapters 9 and 10 on how to secure and launch the site. For me the stand out chapter was chapter 3 and in its own right would serve as a great reference.&lt;br /&gt;&lt;br /&gt;I do have slight problem with this book and that is the lack of content on Codeigniter's form validation. When you create a website, especially an e-commerce website, you create many, many forms. These forms, especially when dealing with commerce is extremely important and the data that you collect has to be absolutely spot on. I understand that the scenarios in the book may have not required the use of the Form Validation class to be used to the level, but I do feel these methods should have been addressed. &lt;br /&gt;&lt;br /&gt;He does use the form validator but not to the extent that uses the rules and data filters. Instead I found myself turning to the web and using online guides to help me with this. One thing I add though, is that like many open source frameworks, Codeigniter moves at a very swift pace and the libraries that are available now may be very different to the ones that were used when the book was written, so for that reason I will give the author the benefit of the doubt.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Final Thoughts&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Overall, a fantastic book. You will not be disappointed with this title and you will definitely be able to use Codeigniter fluently by the time you have finished with it. Like I mentioned the only problem is the lack of depth in the form validation class, but these pages will fill in any gaps:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://codeigniter.com/user_guide/libraries/form_validation.html" target="_blank" rel="nofollow"&gt;http://codeigniter.com/user_guide/libraries/form_validation.html&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.packtpub.com/article/form-validation-with-codeigniter-1.7" target="_blank" rel="nofollow"&gt;http://www.packtpub.com/article/form-validation-with-codeigniter-1.7&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Score: 4.5 out of 5 - Highly Recommeded&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-274900043344837204?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/274900043344837204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2010/11/book-review-of-professional-codeigniter.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/274900043344837204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/274900043344837204'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2010/11/book-review-of-professional-codeigniter.html' title='Book Review of Professional Codeigniter - Wrox Publishing'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-8394694177281040950</id><published>2010-11-06T17:30:00.007Z</published><updated>2010-12-14T11:03:37.237Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='developers'/><category scheme='http://www.blogger.com/atom/ns#' term='website design'/><category scheme='http://www.blogger.com/atom/ns#' term='e-shot design'/><category scheme='http://www.blogger.com/atom/ns#' term='CSS'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><title type='text'>Essential Techniques For E-shot creation for designers and developers</title><content type='html'>For all you web developers out there, E-shot design may seem like a little bit of a hindrance. It's not what you describe as a fundamental skill to master, but it's something that many of us have to do time and again when you work with, or for a design agency. This is primarily down to you having to turn back time when it comes to your web design skills.&lt;br /&gt;&lt;br /&gt;I drew up this set of guidelines as I was commissioned to draw up a fully functional e-shot for a company that specialises in &lt;a href="http://www.fluid-digital.com/"&gt;website design Bury&lt;/a&gt; called Fluid Digital before they took on their own professional developers. Fluid Digital provide some great e-shot services including design, production and delivery, so be sure to look them up.&lt;br /&gt;&lt;br /&gt;Modern positioning and styling techniques center around the following structure:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;element/CSS reference&lt;/span&gt; model which keeps content and layout separate, for example:&lt;br /&gt;&lt;br /&gt;&amp;lt;div id="myElement"&amp;gt;My Content&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;With an accompanying reference in your CSS stylesheet:&lt;br /&gt;&lt;br /&gt;#myElement {&lt;br /&gt;display: block;&lt;br /&gt;float: left;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;That is fine for modern browsers, but when you start creating E-shots, you cannot use this method. No, you have to go 'old-school' and I do mean old school- no element backgrounds, minimal style sheet settings (when you can use them, they have to appear inline with the element). The main reason for going 'old-skool' is because you have to accommodate a number of email clients that all have their own way of doing things. Unfortunately the two most dominant email clients - Microsoft Outlook 2007 and Microsoft Outlook 2010, also have the most restrictions. Microsoft Outlook 2003 is a little more leniant as it used the IE engine to render HTML rather than Microsoft Word.&lt;br /&gt;&lt;br /&gt;Designing your eshots can be tricky and I hope to take you through the majority of sticky points in the points below:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Section Layout&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Like I mentioned above, you cannot use &lt;span style="font-weight:bold;"&gt;element/CSS&lt;/span&gt; to design your pages. In the case of e-shots, you need to go back to the ways of old and use tables to design your layout. In modern web design, when you go to lay out an element like a &amp;lt;div&amp;gt; you would simple add a background, define the width and how the element is positioned in using CSS. Let's compare the two methods.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;The HTML/CSS way&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;#wrapper {&lt;br /&gt;width:655px;&lt;br /&gt;margin: 0 auto;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#column1 {&lt;br /&gt;background-image: url('url/reference');&lt;br /&gt;width: 459px;&lt;br /&gt;float: left;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#column2 {&lt;br /&gt;background-image: url('url/reference');&lt;br /&gt;width: 196px;&lt;br /&gt;float: left;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#footer {&lt;br /&gt;clear:both;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Used in a page, they would look like this:&lt;br /&gt;&lt;br /&gt;&amp;lt;div id="wrapper"&amp;gt;&lt;br /&gt;&amp;lt;div id="column1"&amp;gt;Left Hand Side&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div id="column2"&amp;gt;Right Hand Side&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div id="footer"&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;With an e-shot, you do not have these CSS luxuries as the elements (usually div elements) do not display well in email clients. The background would not show as background-urls are forbidden, the float would not even work properly in a number of clients, though the width probably would.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Positioning&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We use a basic table structure:&lt;br /&gt;&lt;br /&gt;&amp;lt;table width="655" border="0" align="center" cellpadding="0" cellspacing="0"&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td valign="top" width="459"&amp;gt;Left Hand Side&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td valign="top" width="196"&amp;gt;Right Hand Side&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;/table&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_-O1LgQCSNcY/TNWJEjrv4tI/AAAAAAAAAH8/Bs_cBy_kpr0/s1600/tableStructureDiagram.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 19px;" src="http://1.bp.blogspot.com/_-O1LgQCSNcY/TNWJEjrv4tI/AAAAAAAAAH8/Bs_cBy_kpr0/s400/tableStructureDiagram.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5536482028313109202" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;With this you get the two column layout, each cell side by side. Notice the width is contained as an attribute of the table, as is the alignment. There is no need for a clearing div as table cells in the same row inherit the height from their tallest sibling. I have also added the &lt;span style="font-weight:bold;"&gt;valign="top"&lt;/span&gt; attribute as content in cells can be a little bit erratic, this just makes sure that all content positions itself in a uniform manner. This is the basic idea behind positioning elements and content in your eshot. You can use all the normal table goodies of &lt;span style="font-weight:bold;"&gt;colspan&lt;/span&gt; as well as using nested tables to create subsections.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Using Background Images&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can't use them if you want your e-shot to pass muster with all email clients, as background-urls are forbidden. But you do have a couple of options. You can either use an image to encompass all your information, but you then run the risk of your emails being spammed out due to an adverse ratio of text:images or you can use the method I have laid out below which allows you to put image into a table that will encompass your text. As you know the amount of content that will be going in your cell this method would work:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_-O1LgQCSNcY/TNWIh_7IPNI/AAAAAAAAAH0/q1TKwnPME2o/s1600/imagesInTable.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 212px;" src="http://3.bp.blogspot.com/_-O1LgQCSNcY/TNWIh_7IPNI/AAAAAAAAAH0/q1TKwnPME2o/s400/imagesInTable.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5536481434598390994" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Things you can and can't do:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;font-styling(CSS) is fairly safe and you can perform add most attributes like margin and padding, font-weight etc.&lt;/li&gt;&lt;li&gt;Ideally, you want your container element to be no larger than 655px wide&lt;/li&gt;&lt;li&gt;Keep the number of links contained in the email to a reasonable amount to avoid Spamming Issues&lt;/li&gt;&lt;li&gt;CSS styles can be kept in the head, but may cause some problems, it is preferable to keep all CSS inline. One option is to design the Eshot with the styles in your &amp;lt;head&amp;gt; section and then use something like &lt;a href="http://premailer.dialect.ca/"&gt;this&lt;/a&gt; to convert them to inline styles&lt;/li&gt;&lt;li&gt;&amp;lt;td&amp;gt;table cells  - use valign="top" applied as an attribute to the cell instead of using vertical-align in your CSS.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight:bold;"&gt;Here are some tips which could help:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Basically, when you're building an eshot you are not building a modern web page, you're building a web page like you would have done in 1996!&lt;/li&gt;&lt;li&gt;If you feel like you certain clients are not important when your perform your validation then you can always choose to ignore them. I always validate against all versions of Outlook - But like I mentioned above, you allow it to pass the Outlook test then it should be fine in all other clients.&lt;/li&gt;&lt;li&gt;Always include a link to a web page that has the e-shot saved&lt;/li&gt;&lt;li&gt;Always include an un-subscribe link&lt;/li&gt;&lt;li&gt;If you can, include a link back to your website, as you never who is looking at the eshot&lt;/li&gt;&lt;li&gt;Remember to keep your overall width to 655px as this width is the most compatible size with the most amount of clients.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-8394694177281040950?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/8394694177281040950/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2010/11/essential-techniques-for-e-shot.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/8394694177281040950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/8394694177281040950'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2010/11/essential-techniques-for-e-shot.html' title='Essential Techniques For E-shot creation for designers and developers'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_-O1LgQCSNcY/TNWJEjrv4tI/AAAAAAAAAH8/Bs_cBy_kpr0/s72-c/tableStructureDiagram.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-3896259818818275552</id><published>2010-11-03T21:09:00.011Z</published><updated>2010-11-07T14:15:09.921Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='web development'/><category scheme='http://www.blogger.com/atom/ns#' term='website design'/><category scheme='http://www.blogger.com/atom/ns#' term='CSS'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><title type='text'>My top CSS tips</title><content type='html'>In CSS there is usually more than way to skin a cat. Some people use certain methods, some use others. If you a way of styling that works, whose to say it is wrong. Do not let people tell you are doing it wrong.&lt;br /&gt;&lt;br /&gt;I originally created this page as my top 10 tips but still continues top grow on a weekly basis. This post is not a tutorial page, more of a reference for those CSS coders who may be between the beginner and intermediate stage.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Add some consistency&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Reset all your core elements to use the same set of basic rules, as some elements show different amounts of padding/margin by default in different browsers, i.e.&lt;br /&gt;&lt;br /&gt;div, p, ul, li {margin: 0, padding: 0;}&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Types of element&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The main two types of styling elements are block level elements and inline elements. The main difference between a block element and inline elements are that block level elements will take up all the space within their parent element until instructed otherwise through CSS. And remember you can change the display type using your CSS.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;The big difference between padding and margin&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Remember that when dealing with elements. Margin is outside the element and padding is inside the element.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Use single Lines in your style sheet&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Write your CSS in single lines, it may look prettier when you write your code,  but when you have 300 hundred defintions, it can be extremely infuriating to scroll through your page with all those code blocks.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Browser specific CSS&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can override styles for different browsers by browser and version, check &lt;a href="http://css-tricks.com/how-to-create-an-ie-only-stylesheet/" target="_blank"&gt;here&lt;/a&gt; for a really good list that gives you code examples for numerous&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Overriding styles&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Make use of !important when you are struggling with you need to override a style, here is an example:&lt;br /&gt;&lt;br /&gt;color: #FF0000 !important;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Important Shorthand techniques&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Use shorthand techniques when you can. For example, let's take a look at margin (you can substitute padding here if you want to):&lt;br /&gt;&lt;br /&gt;Margin-top: 10px;&lt;br /&gt;Margin-right: 5px;&lt;br /&gt;Margin-bottom: 15px&lt;br /&gt;Margin-left: 4px;&lt;br /&gt;&lt;br /&gt;Can be written like this:&lt;br /&gt;&lt;br /&gt;Margin: 10px 5px 15px 4px;&lt;br /&gt;Top, right, bottom, left&lt;br /&gt;&lt;br /&gt;You may also use another shorthand technique for margin/padding when the top/bottom and left/right use the same values:&lt;br /&gt;&lt;br /&gt;Margin: 10px 5px;&lt;br /&gt;&lt;br /&gt;Or if you want to apply the same value to each side you can use:&lt;br /&gt;&lt;br /&gt;Margin: 10px;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;The need for negativity&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Using negative margins can in some cases be beneficial when you want to position an element just once when you don't want to change the larger majority of elements.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Generic classes&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you think that you will be adding similar styles to a number of different spans, like color. Create a generic class that adds those colours, i.e. if you know that you will be using multiple validation areas then this may be beneficial&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Using multiple classes&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can only assign one ID per element however you can apply multiple classes to an element and is suprisingly easy to do, you just separate the class names using a space. Combining classes can save you repeating definitions and save you time in the long run, for example:&lt;br /&gt;&lt;br /&gt;&amp;lt;div id="elementID" class="class1 class 2 class3 class4"&amp;gt;My Element&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Bullet Points Images&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you want to use an image on a bullet point, you have more control over the image if you do the following. Set the list-style-type to none an add a background-image attribute. The main reason being that you have more control over the background than the normal bullet image as you can use background-position to make sure it looks perfect.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Install the Firebug Add-on for Firefox&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will save you a tonne of time as you can (amongst other things) edit your CSS/HTML on the fly which you allows you to test and try your changes before applying them to your style sheet. There are developer tools for Chrome and IE, but in my opinion neither of them come anywhere near as close to Firebug!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-3896259818818275552?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/3896259818818275552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2010/11/my-top-css-tips.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/3896259818818275552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/3896259818818275552'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2010/11/my-top-css-tips.html' title='My top CSS tips'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-1938553772960504759</id><published>2010-10-17T15:17:00.011+01:00</published><updated>2010-10-20T21:30:18.669+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><category scheme='http://www.blogger.com/atom/ns#' term='databases'/><category scheme='http://www.blogger.com/atom/ns#' term='database timestamp'/><category scheme='http://www.blogger.com/atom/ns#' term='DATETIME'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Filtering date data in MySQL using WHERE against a date</title><content type='html'>In a &lt;a href="http://firmy007.blogspot.com/2010/10/search-functions-against-datetime-in.html"&gt;previous post&lt;/a&gt; I described a method of using DATE_FORMAT to sort data and search against it. That post described how you can sort your data and then use a WHERE clause against it. It basically described a 2 step process, this is alternative and does it in 1 step. There are benefits to both methods and I leave it up to you to decide which way to go.&lt;br /&gt;&lt;br /&gt;N.B. I am sure this method is on a million different websites, I only include it on my blog so that it has both versions.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;The SQL:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;SELECT * FROM your_table WHERE your_timestamp &gt; '2010-10-09 00:00:00' AND your_timestamp &lt; '2010-10-09 23:59:59'&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;The Explanation:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It's quite simple really; MySQL performs a comparison where your value in your DATETIME field is greater than the minimum reference and less than the maximum. In the case above it selects all dates from a specific day (2010-10-09), but in theory you could do it on many different ranges.&lt;br /&gt;&lt;br /&gt;I hope this helps.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-1938553772960504759?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/1938553772960504759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2010/10/filtering-data-in-mysql-using-where.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/1938553772960504759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/1938553772960504759'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2010/10/filtering-data-in-mysql-using-where.html' title='Filtering date data in MySQL using WHERE against a date'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-3837720004347414677</id><published>2010-10-17T10:30:00.003+01:00</published><updated>2010-11-01T16:02:53.918Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP date'/><title type='text'>Stop your website copyright information going out of date</title><content type='html'>If you like your copyright information at the bottom of your website to update itself, do not hard code the date in to the page, use PHP to do it for you.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&amp;lt;?php&amp;gt;&lt;br /&gt;echo '&amp;amp;copy;'.date('Y');&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;That should be more than accurate, but you could always add in the month if you want as well:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&amp;lt;?php&amp;gt;&lt;br /&gt;echo '&amp;amp;copy;'.date('F Y');&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Hope this helps...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-3837720004347414677?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/3837720004347414677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2010/10/stop-your-website-copyright-information.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/3837720004347414677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/3837720004347414677'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2010/10/stop-your-website-copyright-information.html' title='Stop your website copyright information going out of date'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-4006801293051194936</id><published>2010-10-16T12:34:00.001+01:00</published><updated>2010-11-01T15:33:23.988Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Frameworks'/><category scheme='http://www.blogger.com/atom/ns#' term='e-commerce'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='Magento'/><title type='text'>Magento snippets I find useful</title><content type='html'>I have created this page as I often find myself working on Magento projects in many different locations and needed a quick reference. You will often find, you will need to add these in to your scripts to get that level of functionality that you need for your magento customisation.&lt;br /&gt;&lt;br /&gt;N.B. This page is ongoing and will be updated often. All snippets work on 1.4.11&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Singles&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;//get current controller name&lt;/span&gt;&lt;br /&gt;$this-&gt;getRequest()-&gt;getControllerName(); //returns string&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;//get Action Name&lt;/span&gt;&lt;br /&gt;$this-&gt;getRequest()-&gt;getActionName(); //returns string&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;//get Module Name&lt;/span&gt;&lt;br /&gt;$this-&gt;getRequest()-&gt;getModuleName(); //returns string&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;//get Number of items in user cart&lt;/span&gt;&lt;br /&gt;$this-&gt;helper('checkout/cart')-&gt;getSummaryCount(); //returns number of products&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;//check if user is logged in&lt;/span&gt;&lt;br /&gt;if ($this-&gt;helper('customer')-&gt;isLoggedIn()) //returns true/false&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;b&gt;Combinations&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;//check if user is on home page&lt;/b&gt;&lt;br /&gt;if ($this-&gt;getIsHomePage()) { } //returns true/false&lt;br /&gt;&lt;span style="font-size:10px; color:#ff0000;"&gt;//check for home page only works when in header.phtml&lt;br /&gt;//use method below if outside of this file or&lt;br /&gt;//create new instance of:&lt;br /&gt;//Mage_Page_Block_Html_Header() like so:&lt;br /&gt;//$newHeaderObject = new Mage_Page_Block_Html_Header();//&lt;br /&gt;if($newHeaderObject -&gt;getIsHomePage()){} // returns true/false&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;b&gt;//alternative method&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;if (($this-&gt;getRequest()-&gt;getModuleName() == 'cms') &amp;amp;&amp;amp; ($this-&gt;getRequest()-&gt;getActionName() == 'index')) { } //returns true/false&lt;span style="font-size:10px; color:#ff0000;"&gt;&lt;br /&gt;//use this to check if home page in other template (.phtml) files&lt;br /&gt;//works by checking the module name and the action request.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-4006801293051194936?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/4006801293051194936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2010/10/magento-snippets-i-find-useful.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/4006801293051194936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/4006801293051194936'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2010/10/magento-snippets-i-find-useful.html' title='Magento snippets I find useful'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-2615779992754531452</id><published>2010-10-15T09:23:00.002+01:00</published><updated>2010-10-20T09:44:37.628+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><category scheme='http://www.blogger.com/atom/ns#' term='databases'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='DATE_FORMAT WHERE'/><title type='text'>Search functions against DATETIME in MySQL [using PHP]</title><content type='html'>When you are using a database for any large scale application, it is always a good idea to make a note of when things happen, i.e. when a page was created or when a page was updated. The easiest way of doing this is to pass NOW() through your SQL to your database to add the date and time to a DATETIME field, whereby you end up with data looking like this in your table:&lt;br /&gt;&lt;br /&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;2010-10-13 18:32:45&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2010-10-13 18:28:01&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2010-10-13 18:29:17&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;In its raw form, the SQL for performing this function will look something like this:&lt;br /&gt;&lt;br /&gt;SELECT * FROM your_table WHERE DATE_FORMAT(column_name, '%Y-%m-%d')= 'your_date'&lt;br /&gt;&lt;br /&gt;The SQL statement works in two stages:&lt;br /&gt;&lt;br /&gt;1. MySQL first formats the data into your prescribed format, in my case, this was YEAR (%y), MONTH (%m), DAY (%d).&lt;br /&gt;2. Now that MySQL has sorted the data internally, it performs the comparison part of the statement against your formatted data using the WHERE clause.&lt;br /&gt;&lt;br /&gt;Of course, the internal functions that MySQL provides performs the vast majority of the hard work for you. The key to using this solution is to provide your string in the same format as the data is stored. In my case, the string I needed to run a comparison on was a date, the time wasn't a necessary part of the clause, so I provided:&lt;br /&gt;&lt;br /&gt;&lt;font style="font-weight:bold;"&gt;'2010-10-13'&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;So my SQL looked like a little bit like this:&lt;br /&gt;&lt;br /&gt;SELECT * FROM my_dates WHERE DATE_FORMAT(my_date_time, '%Y-%m-%d')= '2010-10-13'&lt;br /&gt;&lt;font class="Apple-style-span"&gt;(Notice the hyphen as the separator, this may differ in your case)&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;%Y = 4 digit numeric YEAR,&lt;br /&gt;%m = 2 digit numeric MONTH,&lt;br /&gt;%d = 2 digit numeric DAY&lt;br /&gt;&lt;br /&gt;There are many other options for date formatting, all of which can be found here on the MySQL website:&lt;br /&gt;&lt;a href="http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_date-format"&gt;http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_date-format&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I have also written a different method of extracting data using a date, you can find that &lt;a href="http://firmy007.blogspot.com/2010/10/filtering-data-in-mysql-using-where.html"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I hope this helps...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-2615779992754531452?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/2615779992754531452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2010/10/search-functions-against-datetime-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/2615779992754531452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/2615779992754531452'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2010/10/search-functions-against-datetime-in.html' title='Search functions against DATETIME in MySQL [using PHP]'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-1257582403681957970</id><published>2010-08-20T23:20:00.009+01:00</published><updated>2010-08-20T23:30:20.760+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP regex'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>UK telephone regex for PHP</title><content type='html'>&lt;div&gt;PHP regex for UK telephone number:&lt;/div&gt;&lt;div&gt;if(preg_match ('/^((\(?0\d{4}\)?\s?\d{3}\s?\d{3})|(\(?0\d{3}\)?\s?\d{3}\s?\d{4})|(\(?0\d{2}\)?\s?\d{4}\s?\d{4}))(\s?\#(\d{4}|\d{3}))?$/', $string)) {&lt;/div&gt;&lt;div&gt;     //do whatever&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;Can't remember where I got this from, if I do I will post link.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-1257582403681957970?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/1257582403681957970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2010/08/uk-telephone-regex-for-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/1257582403681957970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/1257582403681957970'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2010/08/uk-telephone-regex-for-php.html' title='UK telephone regex for PHP'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-9094823762943081089</id><published>2010-08-11T21:21:00.000+01:00</published><updated>2010-08-24T16:04:22.561+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='web development'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='developers'/><category scheme='http://www.blogger.com/atom/ns#' term='SEO'/><category scheme='http://www.blogger.com/atom/ns#' term='web developers'/><title type='text'>Should all web developers work in SEO first</title><content type='html'>First a little background about myself. I first learnt HTML back in 1999 and was immediately blown away by the instant results of it. You added a likely bit of mark up and boom you saw the results in your browser - images, headers, tables the lot. Some quick code and it was like you could paint with the text in a matter of minutes, for someone with zero artistic ability it was a great feeling to see your ideas rendered on a screen. Not that the designs were anything to get excited about, but it was enough to get me hooked in web design. &lt;br /&gt;&lt;br /&gt;Anyways, after a few years playing around at university I thought it was high time I get myself a job in the field that I studied for. After being put in touch with a company through a friend in 2005 I was thrust head first into the wonderful world of SEO (Search Engine Optimisation).&lt;br /&gt;&lt;br /&gt;A very large part of SEO centres on the construction of the web page. There are so many ways that you can build a web that it would take me about a thousand years to go through them all. This article really is a piece about how SEO can help make you a better developer through best practice.&lt;br /&gt;&lt;br /&gt;This blog post is based around a site I took on from a client who had invested thousands of pounds in to a website and was getting very little traffic. He came to me as I had built a number of smaller sites for a mutual acquaintance that had performed very well in the search engines and asked me if there was anything I could do. I took a look at the website and while it had been developed to a very high standard, the optimisation was severely lacking. After going back to the customer, I asked the customer what happened and it was down to the project manager that was employed to manage the job wanting to over-engineer the site, thus bogging down the original developer. A large part of the blog is information, but I will, also add in the example of the rebuild, where I can. There are so many more SEO techniques you can employ in addition to what I mention below. This case study is more of what I did when I rebuilt and the main areas we concentrated. Further more, there was about 1,200 pages in the database, this information went largely unchanged when it moved to its new home, I mention this, because like with all tests, the monitoring of all elements and variables is essential. Please also note that HTTP 301 redirects were used to make sure that no links were broken and that the busiest pages were mapped to forward to their new home. Non-essential pages were mapped to the home page.&lt;br /&gt;&lt;br /&gt;Page construction&lt;br /&gt;&lt;br /&gt;One of the first things that I learnt was how the construction of page can affect the optimisation of a page. In the beginning of my own development I used the very common technique of using tables to create the pages layout (even now, people still use this method) rather than the current element and CSS approach that I use now. When I made the switch to developer, not only is easier to keep your design separate from your source code but also makes for a more optimised page. When Google crawls a page it's not interested in the font sizes of your text or what colour it is, it just cares about the content and how this content fits in to the grand scheme of how Google sees the web. Not that layout is the only important part of page. Page Elements, div tags, H1, H2 and all the other primary tags should be used to create the perfect web page. If you took this idea to the extreme, then only those developers who can create ultimate optimisation should create web pages. This is of course not true, but you can get my point which is when you work in SEO you learn best practice that will help you no end if you change career path and become a developer. &lt;br /&gt;&lt;br /&gt;Using jQuery/JavaScript to help improve your page's content and or functionality&lt;br /&gt; &lt;br /&gt;Let us look at another example; you want a fully functional and flashy slide down menu based at the top of your page. Or the customer wants to have a mission statement at the top of the page that whilst essential to the brand is not necessarily optimised text. A developer without this experience must put the HTML in to the page and think nothing more of it, whereas a person who keeps SEO in mind knows the most optimised text should be towards the top of the page. This us where the SEO primed developer would use jQuery or JavaScript to load the HTML in to the DOM instead. In this situation, we get the best of both worlds as we have our text at the top in terms of presentation and our Google read source code remains uncluttered and optimised.&lt;br /&gt;&lt;br /&gt;Another area I would like to touch on is the URL structure of a website. A great many, many people have argued about URL structure and how it affects SEO, all I can do is talk about how it affected the site I rebuilt for my client. I took a look at the existing URL structure and it was based around a 6 folder deep directory structure, which would have been almost impossible for the Search Engines to crawl, especially as there were 1,200 pages spread amongst them. Whenever I build a site, I keep the site as simple as possible. The site now goes no further than 3 folders deep and each page links to its siblings so that each page had hundreds and hundreds of links going to it.&lt;br /&gt;&lt;br /&gt;I have not created this entry to boast but is more of a case study of how well a site can do when developed even when it has been completely rebuilt with SEO in mind with some figures to back up the theory.&lt;br /&gt;&lt;br /&gt;OK, here are some of the figures for the rebuild, figures post rebuild, figures pre-rebuild a few reminders of some of the facts:&lt;br /&gt;&lt;br /&gt;Pages in site: 1200&lt;br /&gt;Domain Age: 4 years&lt;br /&gt;Months since rebuild (at time of writing): 5 months&lt;br /&gt;Development Language used pre-rebuild: PHP&lt;br /&gt;Development Language used post-rebuild: PHP&lt;br /&gt;URL rewrites in place pre rebuild: Yes&lt;br /&gt;URL rewrites in place post rebuild: Yes&lt;br /&gt;&lt;br /&gt;Average Visits prior to rebuild per month: 1,500&lt;br /&gt;Average Visits post rebuild per month: 8,200&lt;br /&gt;&lt;br /&gt;Yeah, you read that right, the site has had a 550% jump in traffic since the rebuild and the customer is now starting money from, something he wished he had been able to do when he first had the site launched. Yes, the traffic is still not huge, but the 550% increase in traffic in only 5 months is certainly a step in the right direction.&lt;br /&gt;&lt;br /&gt;In conclusion I'm not saying that it is essential to have 10 number of years in SEO to become a web developer but it is important to know how to create a well formed page in terms of optimisation. When you consider how competitive the Search Engine Results Pages are and considering it is the developer that will help you attain these positions - it becomes even more important that these developers know how important optimisation is when developing a website.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-9094823762943081089?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/9094823762943081089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2010/08/should-all-web-developers-work-in-seo.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/9094823762943081089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/9094823762943081089'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2010/08/should-all-web-developers-work-in-seo.html' title='Should all web developers work in SEO first'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-7260184309568853705</id><published>2010-07-16T10:51:00.012+01:00</published><updated>2010-07-16T14:47:59.945+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery newbie'/><category scheme='http://www.blogger.com/atom/ns#' term='CSS'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>How to quickly cache images for css using jQuery</title><content type='html'>Please note, there are other ways of doing this, but this is a quick method for caching images for your page, using a very simple piece of jQuery.&lt;br /&gt;&lt;br /&gt;If you use CSS to change the backgrounds on an element when a user moves their mouse over it you will the new image to display as soon as it happens. If the browser has no record of the image then it has to has immediately send a request to the server for the image. This can take precious seconds and in some cases, could spoil the whole look of your well designed element.&lt;br /&gt;&lt;br /&gt;There are a number of fancy jQuery functions that may allow you to do this in a more compliant standard, but I can't see any harm doing it this way:&lt;br /&gt;&lt;br /&gt;1. Create an empty element within your webpage (I put it just before &lt;strong&gt;&amp;lt;/body&amp;gt;&lt;/strong&gt;), for the case of the example, our element is a div element named 'imageCache':&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&amp;lt;div id="imageCache"&amp;gt;&amp;lt;/div&amp;gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;2. Set its display attribute to none, like so: &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;#imageCache{display:none;}&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This stops the element from showing when the browser displays the page.&lt;br /&gt;&lt;br /&gt;3. In your jQuery code, set the HTML of the element to use the images, in your document.ready function like so:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;$(document).ready(function() {&lt;br /&gt;$('#imageCache').html('&amp;lt;img src="image1" /&amp;gt; &amp;lt;img src="image2" /&amp;gt;');&lt;br /&gt;})&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;4. The Images will not appear as they are inside an element which has no visibility thanks to the CSS.&lt;br /&gt;&lt;br /&gt;Hey Presto, your images are now ready to be used.&lt;br /&gt;&lt;br /&gt;Some people may say that the element should not be added to the web-page unless it is to be used to display something. They may have a point, but if you want a quick solution and you are a jQuery newbie, this will do you just fine and will still pass W3C validation. If that is the case and you do not want an empty tag floating around your HTML source code then use jQuery's 'append' function and add the element in to the DOM and add the images using that method, like so:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;$('body').append('&amp;lt;div id="imageCache"&amp;gt;&amp;lt;img src="image1" /&amp;gt; &amp;lt;img src="image2" /&amp;gt;&amp;lt;/div&amp;gt;');&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Please also note that this could be done entirely using CSS whereby you load in the images directly in to the HTML within your element, they would still be hidden because of the CSS, the above method is the alternative using jQuery.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-7260184309568853705?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/7260184309568853705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2010/07/how-to-quickly-cache-images-for-css.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/7260184309568853705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/7260184309568853705'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2010/07/how-to-quickly-cache-images-for-css.html' title='How to quickly cache images for css using jQuery'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-2539208008155000486</id><published>2010-06-26T08:58:00.000+01:00</published><updated>2010-06-26T12:28:21.090+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='lawsuit'/><category scheme='http://www.blogger.com/atom/ns#' term='Apple'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Surface'/><title type='text'>Are Microsoft Shooting themselves in the foot over Linux Lawsuits</title><content type='html'>Are Microsoft shooting themselves in the foot with the patent lawsuits they are filing regarding Linux. Now, whilst I'm not privy to all the facts of the case, I can still form an opinion on the subject.&lt;br /&gt;&lt;br /&gt;Microsoft, I feel are going through a transistonary period. They are currently facing many challenges on many fronts. For many years they had it all their own way, near enough complete domination of the home computer software market with no real competitors in sight. Then things started to change, slowly at first, but significantly. The Internet allowed people to use their computers in different ways, people were starting to communicate via their machines rather just using them to create reports and pie charts!&lt;br /&gt;&lt;br /&gt;People talked, people listened and eventually Microsoft started to lose ground. New companies started to emerge, Google became the search engine of choice, Apple started to make comeback - the Internet became a place of opportunity. User communities were springing up all over the place, as were developers who now had a platform to showcase their software to like minded individuals, which brings me to my next point - Linux.&lt;br /&gt;&lt;br /&gt;Linux is a distribution based piece of software that runs on personal computers. It is an operating system created by Linus Torvalds and when it was first released the source code was freely available to anyone who wanted it, as long as they were prepared to release their changes back into the community. Distributions sprang up, some more popular than others, some have now gone onto become commercial successes (Red Hat being one of them), which is what is causing Microsoft to ruffle it's feathers. &lt;br /&gt;&lt;br /&gt;It seems that Microsoft is claiming that a number of Linux distributions are infringing their patents and are threatening the companies that use them with legal action. One major sticking point is that Microsoft is failing to mention which ones they are! It seems MS are hoping the threat alone will stop companies using Linux OS software in their products or face the possibility of huge fines, the Dutch company Tom-Tom being one of the more high profile cases. &lt;br /&gt;&lt;br /&gt;Take a look at these points,&lt;br /&gt;&lt;br /&gt;1. The guys who work on the Linux software are extremely clever and seasoned developers and they have huge amounts of people working on the code, far more than Microsoft could ever employ. If MS were to ever actually state the actual infringements and if there was a genuine case of patent infringement, the code would be rewritten by the developers in a matter of moments and released for download.&lt;br /&gt;2. Microsoft has had the lion's share of the home computer market for a long, long time and a little competition never hurt anyone. They now have multiple competitors: Linux, Apple and what was the result, ms release their best ever operating system with Windows 7. It seems the competition did them some good, compared to the normally buggy releases that take years to become what they should have been at release date.&lt;br /&gt;3. The vast majority of people like to fair play and Microsoft's actions are anything but. They are purposefully trying to stifle the competition they are facing from Linux. I know they are trying to protect their future, but this should be done through innovation and product development(see my points below). If Microsoft continue down this route the only they will stifle is the  growth of their reputation. Take a look at Apple, their reputation has gone through the roof these last 10 years or so and it is mainly through them delivering products that satisfy upon release. When a new product is released, the die hard fans buy them in their droves and this is because the people that buy them know that the product will deliver and they never question if the product lives up to expectations. I'm not a massive Apple fan, I own a couple of products, namely an iPod and MacMini but only for application development. I have to say, they are both very good products and I have no doubt if I bought another Apple product it would be very good and I would be happy with it. &lt;br /&gt;&lt;br /&gt;Microsoft have started to branch in to other markets and I consider them to be a company I trust (now) when it comes to delivering software and hardware. ASP.net is a great framework and runs on thousands of machines and servers. The Xbox, another great piece of Hardware that has been bought and used by millions of people. Microsoft are also building and developing 'Surface' a great looking product and if it lives up to its promise will help instill Microsoft in to the psyche of the millions of future users that are out there. It is these things that Microsoft should concentrate on, not slapping companies with lawsuits.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-2539208008155000486?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/2539208008155000486/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2010/06/are-microsoft-shooting-themselves-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/2539208008155000486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/2539208008155000486'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2010/06/are-microsoft-shooting-themselves-in.html' title='Are Microsoft Shooting themselves in the foot over Linux Lawsuits'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-1511729473137209409</id><published>2010-06-22T18:35:00.021+01:00</published><updated>2010-06-26T13:41:13.017+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='introduction to jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='web developers'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>jQuery is what JavaScript should have been - introduction and examples</title><content type='html'>jQuery is what Javascript should have been - introduction and examples&lt;br /&gt;Please note this is not an extensive jQuery tutorial, it is more about how jQuery is the better option for client side browser scripting compared to javaScript and is aimed at people looking to change over from one to the other. jQuery is a framework that uses javascript to 'write less and do more'.&lt;br /&gt;&lt;br /&gt;jQuery is what Javascript should have been. This is most definitely true, but is somewhat harsh I think. Javascript was created by Netscape as a language that allowed the programmer/developer of the website to manipulate the various elements of a web page. It was called JavaScript after Sun licenced their Java brand name to give the language a little more credibility. JavaScript allowed the creators of the website to display and showcase the content with a little more flair.&lt;br /&gt;&lt;br /&gt;Like a lot of things on the Internet, the use of JavaScript was exploited and made web surfing painful at times. JavaScript can be used to open multiple windows at once and these 'popups', especially when a user was connected to the 'net using a dial up connection and tens of windows would open up simultaneously offering you products ranging from hair extensions to god knows what. Popups thankfully became less of a problem as browsers and firewall software improved including pop up blockers.&lt;br /&gt;&lt;br /&gt;Another problem and some may argue a bigger problem was the way the software ran in browsers. Javascript was created by Netscape and was thus adopted by other browsers, unfortunately the language was not adopted as a standard and the browsers (namely Internet Explorer) did not all act the same when they came across JavaScript - this gave developers a huge problem. Scripts had to be tested in mutliple browsers and debugging time obviously shot through the roof.&lt;br /&gt;&lt;br /&gt;This is where the wonder of jQuery comes rushing through. JavaScript had started to be used more and more as many online applications needed the little bit of extra functionality to deliver. jQuery took away the need for writing scripts for multiple browsers. You could in a reduced manner add in code in one line that would without jQuery library taken 10 or so line of code. It really did make it that easy.&lt;br /&gt;&lt;br /&gt;Below are a number of examples of some of the more common tasks that you can use JavaScript for. Starting with the basic task of obtaining an element's value right through to the more advanced method of making an AJAX call. Each example will have the jQuery code followed by the JavaScript that would have been necessary without the jQuery library. jQuery also allows for developers to easily add events to elements, i.e. a mouse click. This is where we will begin as it one of the cornerstones of using jQuery and using for the coding on the web.&lt;br /&gt;&lt;br /&gt;For the sake of this tutorial, I will be an using an element named 'myElement' - which could be anything like a paragraph, div, input. If any other elements are used or are a special, I will explain further where necessary.&lt;br /&gt;&lt;br /&gt;You will see the $ sign a lot throughout this exercise, it basically means let jQuery handle the code.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="color:#666666;"&gt;&lt;b&gt;Adding an event in jQuery:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is how you add an event in jQuery:&lt;br /&gt;&lt;b&gt;$('#myElement').click(function(){&lt;br /&gt;alert('Hello World');&lt;br /&gt;});&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Like with all jquery it works in all browsers, now lets take a look at the above in plain JavaScript, unfortunately there are a number of issues when it comes to adding event handlers - Internet Explorer. Microsoft, in their infinite wisdom decided to add their own event handling system.&lt;br /&gt;&lt;br /&gt;Here is the the code according to w3c specification - i.e. for Firefox, Opera, Chrome using an anonymous function as the second parameter - you could as easily add a reference to another function, i.e. myFunction() instead like I have shown on the Internet Explorer example below&lt;br /&gt;&lt;br /&gt;&lt;b&gt;myElement.addEventListener('click',function(){&lt;br /&gt;alert('Hello World')&lt;br /&gt;},false);&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The 3rd parameter given here as boolean = false refers to refers to event bubbling and that goes beyond the scope of this introduction, rest assured though, jQuery makes that easier too!&lt;br /&gt;&lt;br /&gt;Here is the code for Internet Explorer&lt;br /&gt;&lt;br /&gt;&lt;b&gt;myElement = document.getElementById('myElement');&lt;br /&gt;myElement.attachEvent('onclick',myFunction);&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The problems here not only lead to writing more code to get the reference for the variable, address both w3c spec and non w3c spec browsers but you may also have to write code that detects the browser type so that your script doesn't cause errors.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#666666;"&gt;Getting the value of a input form field&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This includes select inputs and and select, most form values- I know, how easy...&lt;br /&gt;&lt;br /&gt;&lt;b&gt;var myVar = $('#myElement').val();&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Now let's look at this in plain JavaScript to obtain a text input value:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;var myVar = document.getElementById('myElement').value;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;For a select dropdown menu it's even more cumbersome, not only do you have to select the element from a form, but you have to go through the array of options to find the value:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;var mySelectDropDown = document.forms['myForm'].mySelect;&lt;br /&gt;var selectChoice = mySelectDropDown[mySelectDropDown.selectedIndex].value;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#666666;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;Modifying an Element's CSS property&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Let us look at this in jQuery:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;$('#myElement').css('background-color','#000000');&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Now let us look at this in JavaScript:&lt;br /&gt;&lt;br /&gt;In this case we are going to change the background color of an element and set it to black(#000000). First we have to find the element using the document.getElementById() function. We then have to name the CSS property&lt;br /&gt;&lt;br /&gt;&lt;b&gt;myElement = document.getElementById(myElement')&lt;br /&gt;myElement.style.backgroundColor = "#000000";&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Again, how much easier is this? The added bonus is that it uses the same referencing system that you may be used to using in CSS, rather than a different reference, again saving you time and effort.&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#666666;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;On to Ajax...&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="color:#666666;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;Performing jQuery Ajax calls couldn't be easier. This example uses a the .open() method, but there are a number others you may be interested in, namely $.get() and $.post(), so you may want to read up on them later. The following example takes the contents of another page and then adds the content to the element:&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;b&gt;$('#myElement).open('myOtherPage.html);&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Now let's look at that in plain JavaScript:&lt;br /&gt;&lt;br /&gt;//first we have to create the XmlHttpRequestObject&lt;/div&gt;&lt;div&gt;&lt;b&gt;var myAjaxObject = createXmlHttpRequestObject();&lt;/b&gt;&lt;/div&gt;&lt;div&gt;//then we create the function that triggers the event&lt;/div&gt;&lt;div&gt;&lt;b&gt;function getContents() {&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;      //reference the source to open    &lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;      myAjaxObject.open('get', 'myOtherPage.html);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;     //assign the function that will handle the response&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;     myAjaxObject.onreadystatechange = handleInformation;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;     //declare extra parameters, not needed when using the get method&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;     myAjaxObject.send(null);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;&lt;div&gt;//now we have to create the function to handle the above:&lt;/div&gt;&lt;div&gt;&lt;b&gt;function handleInformation() {&lt;/b&gt;&lt;b&gt;     //check the state of the request&lt;/b&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;     if(myAjaxObject.readyState == 4 &amp;amp;&amp;amp; myAjaxObject.status == 200) { &lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;           //Add the information to the myElement ID&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;          myElement = document.getElementById('myElement');&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;          myElement.innerHTML = myAjaxObject.responseText;  &lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;     }&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Hope this helps.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-1511729473137209409?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/1511729473137209409/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2010/06/jquery-is-what-javascript-introduction.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/1511729473137209409'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/1511729473137209409'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2010/06/jquery-is-what-javascript-introduction.html' title='jQuery is what JavaScript should have been - introduction and examples'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-3202613478346761647</id><published>2010-06-21T19:06:00.006+01:00</published><updated>2010-06-21T19:35:09.096+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Bing'/><category scheme='http://www.blogger.com/atom/ns#' term='Facebook'/><category scheme='http://www.blogger.com/atom/ns#' term='Cloud'/><category scheme='http://www.blogger.com/atom/ns#' term='Search Engines'/><category scheme='http://www.blogger.com/atom/ns#' term='Online Applications'/><category scheme='http://www.blogger.com/atom/ns#' term='Google'/><category scheme='http://www.blogger.com/atom/ns#' term='Yahoo'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft'/><title type='text'>Facebook and Microsoft to take on Google?</title><content type='html'>I'm a pretty regular Facebook user, but I am a heavy, heavy Google user. I was browsing on Facebook the other day and I have seen that Facebook is offering up web search results as part of its search scheme. Have I clicked on the links yet? No, I still use Google.&lt;br /&gt;&lt;br /&gt;Google became popular because it offered great results and its home page was quick to load for dial up users, these were its advantages and like in nature, the strongest survived. Could Facebook's main advantage be that allows people to do everything in one place. Search And Socialise could be next big thing - Remember that users are only one click away from leaving any site.&lt;br /&gt;&lt;br /&gt;At the moment though it seems that Facebook is beginning to offer these results as a supplementary set of links after the results that are shown for pages/profiles on their own system. How is it doing this? Well the key thing is that they are using Bing as the provider. Bing as we all know, is part Microsoft/part Yahoo and it should come as no surprise that Microsoft is becoming more and more visible in Facebook. For those who didn't know, MS bought a large stake in the site in 2007. In my opinion, I'm surprised that it took them this long to do it.&lt;br /&gt;&lt;br /&gt;It seems that is this is yet another step by Microsoft/Bing, after their merger with Yahoo to take on Google and to make sure they are at the forefront of the web. They know that were caught with their pants down when it came to the Internet and how it was going change the way that people were going to go about their day to day business. Google on the other hand, were one of the companies that really benefited from this and it was them have constantly pushed the boundaries, whether it be offering an Web Email alternative to Hotmail or buying companies that they know can improve their business model.&lt;br /&gt;&lt;br /&gt;So what could this mean for the future, well a few things are starting to emerge in the online world which shows that Microsoft and its partners are slowly to try to catch Google in the Search Engine and online application stakes. When Google launched it's version of office online that allowed users to create and edit from decentralised locations, it was seen as ground breaking. Microsoft has not taken this lying down and has in the last couple of weeks incorporated software into Hotmail that allows users who have sent and received MS Office documents to edit them from within their browser in the cloud.&lt;br /&gt;&lt;br /&gt;In terms of Facebook, what next there. Well I bet that we'll once again get an update to the Facebook front end that will add the Bing results in to the pages in a more in-your-face-way rather than at the bottom of the pages, like they are now.&lt;br /&gt;&lt;br /&gt;For Google, their next big mission is obviously going to be the encroachment on the operating system market with their introduction of Chrome OS. This may allow them to take back other market share that they may lose in the future as a result of the above. They are though, going to have to think long term with this project. There are a number of large players in this market already, most notably Windows, Linux, Mac OSX and loosening their grip on the operating system is going to be tough - I'm sure most of you know how loyal Apple fans are.&lt;br /&gt;&lt;br /&gt;James&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-3202613478346761647?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/3202613478346761647/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2010/06/facebook-and-microsoft-to-take-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/3202613478346761647'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/3202613478346761647'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2010/06/facebook-and-microsoft-to-take-on.html' title='Facebook and Microsoft to take on Google?'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-6627562461817926830</id><published>2010-06-14T12:27:00.010+01:00</published><updated>2010-06-14T15:36:24.359+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Scheduled MySQL Backups'/><title type='text'>How to make Scheduled MySQL database backups using Windows</title><content type='html'>Had a bit of a hair raising issue the other morning with database problems. So I decided to write this post: There are a number of other options some paid, some free. But this is a free solution and works using free software that anyone can download.  The more commercial software allows you to manage multiple databases easily, but if you need to backup your database on a budget or you only have a small number of databases on the same server then this will suit you fine. When I get round to it, I will write this tutorial for Linux. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Also this article assumes you will have your machine switched on when you set the scheduled backup to run.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The software:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;1. Download and install MySQL Administrator Tools from mysql.com: &lt;a href="http://dev.mysql.com/downloads/gui-tools/5.0.html" target="_blank"&gt;http://dev.mysql.com/downloads/gui-tools/5.0.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2. When you have installed the program, look in your start menu for the MySQL System Tray Icon - run that (if not already).&lt;br /&gt;&lt;br /&gt;3. Right Click on the system tray icon -&gt; Monitor Options -&gt; Launch Monitor After Login&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Setting up the MySQL Backup&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;1. Connect to your database using the supplied information&lt;br /&gt;2. Set up the environment&lt;br /&gt;&lt;br /&gt;Tools -&gt; Options -&gt; General Options&lt;br /&gt;&lt;br /&gt;Check The Store Passwords Option&lt;br /&gt;Set Password Storage Method = Obscured&lt;br /&gt;&lt;br /&gt;Click Apply&lt;br /&gt;&lt;br /&gt;This is so that your backup Choices can remember the details&lt;br /&gt;&lt;br /&gt;Click Close&lt;br /&gt;&lt;br /&gt;3. Add a stored connection. This can be done via the stored save Current connection option, but this normally doesn't work for me as the connection disappears from the folder on restart of the program. So for the sake of this tutorial we will be saving a brand new connection&lt;br /&gt;&lt;br /&gt;Tools -&gt; Manage Connections&lt;br /&gt;&lt;br /&gt;Click New Connection&lt;br /&gt;Under Connection - Add a name, i.e. the website name&lt;br /&gt;Username: Enter the username for the database connection&lt;br /&gt;Password: Enter the password for the database connection&lt;br /&gt;Hostname: The hostname or IP address of your database&lt;br /&gt;&lt;br /&gt;Click Apply and Close the dialog and then close the program. This has to be done as to schedule the backup properly you need to be logged in under a stored connection.&lt;br /&gt;&lt;br /&gt;4. Now back at your main screen, click the backup button&lt;br /&gt;&lt;br /&gt;5. Click New Project and the screen will become active with your database(s) on the left. - Enter a name in to the Project Name field&lt;br /&gt;&lt;br /&gt;6. Click the database(s) you want to add to your backup by clicking on the 'greater than' arrow that points to the right - '&gt;'and this will add the database to the backcup operation as well as all the tables within (default)&lt;br /&gt;&lt;br /&gt;7. Once you have done this - click the Schedule Tab at the top&lt;br /&gt;&lt;br /&gt;8. Click Schedule This Backup Project and then choose a location where your backups should be stored&lt;br /&gt;&lt;br /&gt;9. The filename should be filled in automatically, so choose your own backup Execution options: Time, Frequency - i.e. daily, weekly...&lt;br /&gt;&lt;br /&gt;10. Click Save Project&lt;br /&gt;&lt;br /&gt;11. Click Execute Backup to test settings&lt;br /&gt;&lt;br /&gt;12. Enter your windows password (if required)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-6627562461817926830?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/6627562461817926830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2010/06/how-to-make-scheduled-mysql-database.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/6627562461817926830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/6627562461817926830'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2010/06/how-to-make-scheduled-mysql-database.html' title='How to make Scheduled MySQL database backups using Windows'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-4121159611262404668</id><published>2010-06-10T13:50:00.000+01:00</published><updated>2010-06-10T14:04:50.634+01:00</updated><title type='text'>Performing mathematical analysis on two dates using PHP</title><content type='html'>Hi there,&lt;br /&gt;&lt;br /&gt;I recently had to work out how much time had passed since an event had occurred in PHP and needed to do in a way that worked it out in minutes. I of course decided to use PHP's time functions to do so.&lt;br /&gt;&lt;br /&gt;The key to making this work was of course to find out how time had passed between two references, namely now and a stored reference of time, i.e. a date time piece of information stored in a database, i.e. '2010-06-03 09:56:00'.&lt;br /&gt;&lt;br /&gt;The first thing we have to do is find out the UNIX timestamp of the date that we are going to compare now to and this is done like so:&lt;br /&gt;&lt;br /&gt;$reference1 = strtotime('2010-06-03 09:56:00');&lt;br /&gt;/*&lt;br /&gt;This function takes a typed out date time value (its first parameter) and and then returns the number of seconds that have passed since 1970-01-01 00:00:00 - aka The Unix Epoch.&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;$reference2 = time();&lt;br /&gt;/*&lt;br /&gt;This again returns the number of seconds passed since the Unix Epoch.&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;Now that we have our our two values standardised in to seconds we can perform analysis on them by using a little mathematics, like so:&lt;br /&gt;&lt;br /&gt;//calculate difference in seconds&lt;br /&gt;echo 'Seconds: '. $secondsPassed = $reference2-$reference1;&lt;br /&gt;  &lt;br /&gt;//calculate seconds to minutes&lt;br /&gt;echo ' Minutes: '. $minutes = $secondsPassed/60;&lt;br /&gt;  &lt;br /&gt;//convert minutes to hours&lt;br /&gt;echo 'Hours: '. $hours = $minutes/60;&lt;br /&gt;&lt;br /&gt;//convert to days&lt;br /&gt;echo 'Days: '. $days = $hours/24;&lt;br /&gt;&lt;br /&gt;//convert to weeks&lt;br /&gt;echo ' Weeks: '. $weeks = $days/7;&lt;br /&gt;&lt;br /&gt;Of course this is only a small set of examples and you can mix and match the arithmetic to get to a more precise value in less steps. This example also doesn't round any figures, but you may wish to do so, functions like round(), ceil() and floor() would be of help, depending on the value you want to extract.&lt;br /&gt;&lt;br /&gt;I hope that helps.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-4121159611262404668?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/4121159611262404668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2010/06/performing-mathematical-analysis-on-two.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/4121159611262404668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/4121159611262404668'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2010/06/performing-mathematical-analysis-on-two.html' title='Performing mathematical analysis on two dates using PHP'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-4216716150482593966</id><published>2010-06-02T08:44:00.008+01:00</published><updated>2010-06-08T09:47:57.529+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='web development'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone Apps'/><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='web applications'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>What is it be a web developer?</title><content type='html'>This piece is not about the history of the web, more about how the web grows and how new technologies constantly change the nature of what it means to be a web developer.&lt;br /&gt;&lt;br /&gt;The Internet is growing (nothing new there with that statement). When a new idea or piece of technology springs up, developers are needed to be able to write software for it so that the new innovation gains ground and popularity.&lt;br /&gt;&lt;br /&gt;The term 'web developer' came about because the web became the most sought after use for the Internet. When this happened people wanted to access information quickly and reliably. As a result web developers started programming on systems and servers that could dish out this information in a better way. With the integration of databases and server side coding, it allowed websites to move on from the stateless nature of HTML that is when Tim Berners-Lee developed it.&lt;br /&gt;&lt;br /&gt;As time has moved on the web has gone from strength to strength. The other huge leap forward was advent of Javascript, a programming language that allowed coders to manipulate the pages that users saw in their browsers. This allowed websites to start behaving more the more traditional applications that ran on PCs and other computers. Of course it was only matter of time when the two started to inter mingle to give us even better applications and lo and behold Ajax sprang up when Microsoft created the XMLHttpRequest Object which allowed developers to send asynchronous requests to servers without the page reloading, thus enhancing even further the web experience. Ajax was designed to work with both XHTML and XML so that information could be injected and updated quickly and using less resources. Why reload the whole page when you only need to change the information in a single element? XML and the many web services created to use it allowed people to integrate information from website to another in a standardised way and crossed the divides that sprung up from the use of different systems.&lt;br /&gt;&lt;br /&gt;The web didn't stop there over time, newer ideas and innovations continued to spring up all over the shop and applications became more and more complex. Social Media started to come in to the main stream and integration between web sites and applications became more and more common. MySpace and Facebook started to come to fruition and the web continued to make new ground with many people that had considered the web to be a fad with those 'young people'.&lt;br /&gt;&lt;br /&gt;With the advent of Ajax it allowed applications to be made and resemble desktop programs, but there was a problem that became apparent as time went on. As with most javaScript functionality it had its problems with the numerous browsers that were available in the market. It was also quite code intensive and lots of testing was usually needed to make sure code with all browsers. That is where my topic pops up and that topic is jQuery. jQuery is a javaScript framework and has ironed out many of the problems that made javaScript such a pain to work with in the first place. DOM traversal, Ajax calls and element selection was made easier and standardised, no more cross compatibility testing to make sure things worked in firefox and IE. Debugging and development time has become vastly decreased, something of which, if you are a business can be passed on when you quote your customers for work.&lt;br /&gt;&lt;br /&gt;So what is the future for the web. Well in my opinion, the future is becoming smaller. Well it is terms of the web. Mobile technology is becoming more and more common and I think that is where a lot of the future innovations will lie. Apple and Google have both moved into the mobile phone market and making a lot of people think about using their mobile device as the primary device for accessing the Internet. I myself have bought a mac mini to develop applications for iPhone as I want to keep with up with how the market is changing. I haven't actually created an app yet as I have too many commitments in other areas but the area between desktop applications and web applications are coming together quicker than ever, something of which I think will change the web and the Internet forever.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-4216716150482593966?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/4216716150482593966/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2010/06/what-is-it-be-web-developer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/4216716150482593966'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/4216716150482593966'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2010/06/what-is-it-be-web-developer.html' title='What is it be a web developer?'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-4058899048604499750</id><published>2010-06-02T08:43:00.015+01:00</published><updated>2010-06-05T11:19:07.733+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='learning'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='CSS'/><category scheme='http://www.blogger.com/atom/ns#' term='OOP'/><category scheme='http://www.blogger.com/atom/ns#' term='applications'/><category scheme='http://www.blogger.com/atom/ns#' term='web applications'/><category scheme='http://www.blogger.com/atom/ns#' term='script'/><title type='text'>How long does it take to become a web developer</title><content type='html'>This is almost like the question 'how long is a piece of string', because in my experience you can never stop learning.&lt;div&gt;The real question is how long does it take to become proficient as a web developer and my answer, in my opinion is about 2 years. This is obviously not a definitive answer and is subject to change, especially if you know a programming language for another discipline.  The 2 year time frame should not put you off, but it will take you this amount of time to really truly understand all the ins and outs of web programming.&lt;/div&gt;&lt;div&gt;First let's take a look at what you technologies have to learn to become a web developer. When you start down this road, you need to understand how the web works and why it does what it does. What happens when a request is made by the user, how a server responds and how the output is generated by the browser. &lt;/div&gt;&lt;div&gt;The basic model for this piece of user interaction is like so:&lt;/div&gt;&lt;div&gt;The User Requests data via their browser -&gt; The web server responds and sends HTML (Hypertext Markup Language - the language your browser understands) to your computer/device which then in turns displays it to you. That is it, the basic web request.  A few other bits and pieces are sent but we'll look at those a little later.&lt;/div&gt;&lt;div&gt;So let's look at the above and break it down. The HTML this is the basic building block of the web and you cannot create a web page without knowing how write HTML.  So this is obvious place to start, learning HTML is not that hard and you should be able to start knocking pages together within a week or so.  The other part of learning how to write HTML is the ability to learn something called Cascading Style Sheets (CSS). CSS is a technology that allows a page's content (the HTML) and the page's design to be separated in to different elements. This allows for a more structured site, easier design updates and less cluttered mark up. Learning CSS can take a little longer to learn HTML as it has many different aspects to it.  There are great many tutorials and books out there and any decent book that teaches you HTML should teach you CSS, if it doesn't, pick a different book. I have already written different &lt;a href="http://firmy007.blogspot.com/2009/07/my-php-development-book-list.html"&gt;post&lt;/a&gt; regarding books for beginners, so please take a look there for my recommendations. You should be able to grasp a good amount of CSS in a few weeks/months for you to be able to start knocking web pages together, it can take a couple of years to master CSS as there are so many ways of doing things. i.e. using different methods to solve different issues, different properties for different elements and coupled with the fact that it is constantly being updated by the W3c, it gives CSS and long a drawn out learning curve.&lt;/div&gt;&lt;div&gt;The previous paragraphs, really dealt with the browser/client side of what websites and how they work. The next sections really deal with how a server sends a page to the user.  At a basic level a server responds with HTML based on a request from the user. These pages can be static - where a page's content is hard coded in to the request page or dynamic - where a page is constructed and delivered according to a set of parameters. Dynamic pages are still served in HTML, this is the only language a browser can intepret, the difference with a dynamic page is that the page's content can be manipulated by the server when it sends the information.&lt;/div&gt;&lt;div&gt;This is where you really start to become a 'web developer', when you start to learn a language that runs on a web server and is executed at run time.  There are a great many choices when it comes to choosing the language, my personal preference is PHP, many others like ASP.net or Java - all work in a similar way and all perform similar tasks though PHP allows you to code using both procedural and object oriented approaches (see other posts of mine regarding this). This part of the learning curve is going to be the longest. You should be able, once you have grabbed the principles of programming, to start programming in PHP and even start creating some dynamic pages within a couple of months, even less if you are doing it full time. Believe me, if you stick with it and you like coding, when you start creating programs, see people using them, then you really feel an excellent sense of worth.  However to truly understand the language of PHP is going to take a while, you may be able to create some decent scripts quickly, but like I said before it will probably take you a couple of years, before you get to the point where you are truly comfortable with language. An example of this is where you get to the point that you know that no matter what a customer/colleague asks you to do, you know that you will be deliver what ever they need.&lt;/div&gt;&lt;div&gt;Once last thing, before I sign off. People often ask 'Am I am scripter or a programmer ?'  This is a large can of worms and I do not wish to reopen it as it has been argued to and fro by many people. In my opinion, a script is something that runs on a single page, an application is something that runs across many pages and does multiple tasks geared towards a set of goals or objectives.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-4058899048604499750?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/4058899048604499750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2010/06/how-long-does-it-take-to-become-web.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/4058899048604499750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/4058899048604499750'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2010/06/how-long-does-it-take-to-become-web.html' title='How long does it take to become a web developer'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-7698950246101952908</id><published>2010-05-08T22:09:00.001+01:00</published><updated>2010-05-28T15:01:46.842+01:00</updated><title type='text'>My thoughts on my Mac Mini and OSX</title><content type='html'>Despite the excellent releases in my previous &lt;a href="http://firmy007.blogspot.com/2010/05/building-iphone-apps-cheaply-my-initial.html"&gt;post&lt;/a&gt; both working, there were a number of issues with the installations. Despite the community, there is a certain amount of luck when it comes to osx86 and it is down the architecture of how a PC is put together. There are numerous configs and countless peripherals - both the PC's biggest strength and weakness. The PC is slated by many a (mac) user because it crashes often, but compared to the Mac it is so much more versatile. Windows can run thousands of different components and in nearly every case it runs them well. There are some conflicts, but Windows 7 is so close to getting this right I have to say that the OS is almost perfect. The second part of this is that most Mac users make the incorrect assumption when they make their face of disgust when it talking about PCs that all PCs = Windows. I am also a very heavy Linux user. I have to be, I'm a PHP developer and the language runs best when it runs on a Linux Machine (but it can run on Windows ;-))&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; The reason I mention all this is because I tried everything that I could before purchasing my Mac-Mini. I also want to show that I have a reasonable background to give an honest and frank review of my new piece of equipment.&lt;div&gt;&lt;br /&gt;Anyway, down to my first thoughts of the Mac. Well it cost £592 for a machine with a Intel core 2 duo CPU, 320gb hard drive and 1gb of RAM. Quite expensive for that range of kit, but the little box that encompasses it is very, very well built and is very, very quiet. Not to mention that it uses very little power at all. Perfect for the greenies out there that want to save the planet and still be able to use a computer. My one [tiny] problem with the hardware is that Apple supplies a Mini DVI to DVI adapter but it is only DVI-D.  Most adapters that PC monitor owners have are DVI-I and the two will not fit together, I had to buy one from Amazon. Other than that Iwas very happy with it.&lt;br /&gt;&lt;br /&gt;Down to Mac OSX - it's a good system and owes much of its existence to Unix/BSD and this can be seen in many areas of the OS. If you are a seasoned Linux/Unix user then you should have no problem using Mac OSX and you can probably do more with the system than most Mac OSX users. I have to say it works pretty well and it does everything it should do, you can customise most of the OS and you can do it with very little fuss. The one major advantage that MAC OS has over Windows is when it comes to system settings. Apple pretty much knows what components are going to be found in the box and therefore its drivers should be perfect, this shows. I think this is where most Mac users get the notion 'my Mac just works'. Can you imagine buying a PC, unpacking it and it 'not working', no me neither. I like the OS, the dock and a number of other things, but it is no better than Windows. It does 'work', but so do my Windows and Linux Machines, funny that!&lt;br /&gt;&lt;br /&gt;Whenever you talk to any Mac owner they say they would never go to back to using Windows. When it comes to the Apple brand it has some of the most loyal customers of any company I know of and I think I have found out why this is so. Apple spoil their customers. They make them feel special, they make them feel like they are a cut above the rest and that paying a premium for a service is perfectly fine. I have to admit that when I first opened the system I felt that little bit of Apple magic, the box and packaging was flawless, you even get a little message saying telling you that you and your product are one. The way they spoil the customer doesn't just stop with the packaging, it runs through the system, brushed aluminium is everywhere from the keyboard to the way that it is part of your desktop programs.&lt;br /&gt;&lt;br /&gt;This is not a rant against Apple, they make some great products and they are perfect for certain functions, but it is more a discussions urging users to remain pragmatic and to use the right tool for the job and that there are (nearly always) alternatives.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-7698950246101952908?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/7698950246101952908/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2010/05/my-thoughts-on-my-mac-mini-and-osx.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/7698950246101952908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/7698950246101952908'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2010/05/my-thoughts-on-my-mac-mini-and-osx.html' title='My thoughts on my Mac Mini and OSX'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-5097949110318023404</id><published>2010-05-08T19:57:00.005+01:00</published><updated>2010-05-08T22:11:58.587+01:00</updated><title type='text'>Building iphone Apps Cheaply - my initial thoughts on my Mac Mini purchase</title><content type='html'>Hell must have frozen over. I'm also pretty sure that someone out there is going to make me eat my hat as It is probably something I would have said should anyone have asked me whether or not I would ever buy a mac product.&lt;br /&gt;&lt;br /&gt;I have been a PC user since I was the tender age of 15 and I love PCs and I love using them. I feel very much at home when I have a computer in front of me.&lt;br /&gt;&lt;br /&gt;Unfortunately, the times they are changing (thanks bob ;-)) and with the advent of the iPhone from Apple and customers enquiring more and more about iPhone Apps I decided a Mac was needed. The first thing I tried was one of the number of hackintosh products, both iAtkOS and Kalyway relases of osx86 and I managed (albeit after a lot of hard work and tinkering) to get them working. I managed to get one working on a AMD based system and one on a Intel Core 2 Duo System, they are both made and very well supported by a dedicated community. There are answers out there for almost any product for both releases, so it is a great way to get to know OSX and you can do it with the equipment you probably already own. If you want to find a copy, check out the bay of pirates.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-5097949110318023404?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/5097949110318023404/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2010/05/building-iphone-apps-cheaply-my-initial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/5097949110318023404'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/5097949110318023404'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2010/05/building-iphone-apps-cheaply-my-initial.html' title='Building iphone Apps Cheaply - my initial thoughts on my Mac Mini purchase'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-7325597703666757047</id><published>2010-05-01T11:21:00.013+01:00</published><updated>2010-05-08T10:39:51.230+01:00</updated><title type='text'>Using PHP's XMLWriter to create a basic Google SiteMap</title><content type='html'>&lt;div&gt;The PHP manual is one of the greatest programming references I have ever used, however when I came across the need to use XML Writer class that is packaged with the later versions of PHP I needed a quick guide to using this amazing class and couldn't find one.  So in the spirit of the open source movement I decided to write this little tutorial, it's not exhaustive, but it should get you started and it's handy when I work in different places and I need a quick reference to the class.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;I had to create an XML feed for Google Maps and I needed to do it using PHP. As the site was dynamic and the URLs were often changing, it would have become a little tedious to create and update an XML feed by hand. Here I will explain the core methods to create your sitemap in PHP and where to post it on Google Webmaster Tools.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To get you started you need to create an instance of the class.  Once that is done we will be using these methods. There are others available, but in this case, these are the only ones we need:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style = "height: 650px; width: 400px; background-color: #eeeeee; overflow: scroll; color: #000000; padding:10px"&gt;&lt;div&gt;//create the instance&lt;/div&gt;&lt;div&gt;$xml = new XMLWriter();&lt;/div&gt;&lt;div&gt;//assign memory for output&lt;/div&gt;&lt;div&gt;$xml-&gt;openMemory();&lt;/div&gt;&lt;div&gt;//start the document &lt;/div&gt;&lt;div&gt;$xml-&gt;startDocument();&lt;/div&gt;&lt;div&gt;//create our first element. We use this element when we do not want to close the element after the value has been written&lt;/div&gt;&lt;div&gt;$xml-&gt;startElement('urlset');&lt;/div&gt;&lt;div&gt;//this adds the correct namespace for the sitemap specification&lt;/div&gt;&lt;div&gt;$xml-&gt;writeAttribute('xmlns','http://www.sitemaps.org/schemas/sitemap/0.9');&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;//your set of urls, could be generated in a number of ways including a database&lt;/div&gt;&lt;div&gt;$urls = array('http://www.domain.com/index.htm', 'http://www.domain.com/page2.htm', 'http://www.domain.com/page3.htm');&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;//loop through your urls&lt;/div&gt;&lt;div&gt;foreach ($urls as $url) {&lt;/div&gt;&lt;div&gt;    $xml-&gt;startElement('url');&lt;/div&gt;&lt;div&gt;    $xml-&gt;writeElement('loc', $url);&lt;/div&gt;&lt;div&gt;    $xml-&gt;endElement();&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;//this ends the urlset element&lt;/div&gt;&lt;div&gt;$xml-&gt;endElement();&lt;/div&gt;&lt;div&gt;//end the document&lt;/div&gt;&lt;div&gt;$xml-&gt;endDocument();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;//declare the type of page that you will be creating&lt;/div&gt;&lt;div&gt;header('Content-Type: text/xml');&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;//flush the content into the page&lt;/div&gt;&lt;div&gt;echo $xml-&gt;flush();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There are 3 other optional piecse of information you can add to the url element, these are:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;lastmod&lt;/div&gt;&lt;div&gt;changefreq&lt;/div&gt;&lt;div&gt;priority&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In terms of adding them in to the above code, you could make the array multi dimensional and change your foreach loop to look something like this:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;$urls = array(&lt;/div&gt;&lt;div&gt;    $urls[] = array('location' =&gt; 'http://www.domain.com/index.htm', 'lastmod' =&gt; '2009-12-10', 'changefreq' =&gt; 'daily', 'priorty' =&gt; '0.8'),&lt;/div&gt;&lt;div&gt;    $urls[] = array('location' =&gt; 'http://www.domain.com/page2.htm', 'lastmod' =&gt; '2009-12-11', 'changefreq' =&gt; 'daily', 'priorty' =&gt; '0.7'),&lt;/div&gt;&lt;div&gt;    $urls[] = array('location' =&gt; 'http://www.domain.com/page3.htm', 'lastmod' =&gt; '2009-12-12', 'changefreq' =&gt; 'daily', 'priorty' =&gt; '0.5'),&lt;/div&gt;&lt;div&gt;);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;//loop through your urls&lt;/div&gt;&lt;div&gt;&lt;div&gt;//we use write element when are opening and closing a tag at the same time&lt;/div&gt;&lt;div&gt;foreach ($urls as $url) {&lt;/div&gt;&lt;div&gt;    $xml-&gt;startElement('url');&lt;/div&gt;&lt;div&gt;    $xml-&gt;writeElement('loc', $url['location']);&lt;/div&gt;&lt;div&gt;    $xml-&gt;writeElement('lastmod', $url['lastmod']);&lt;/div&gt;&lt;div&gt;    $xml-&gt;writeElement('changefreq',$url['changefreq']);&lt;/div&gt;&lt;div&gt;    $xml-&gt;writeElement('priority', $url['priority']);&lt;/div&gt;&lt;div&gt;    $xml-&gt;endElement();&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-7325597703666757047?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/7325597703666757047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2010/05/using-phps-xmlwriter-to-create-basic.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/7325597703666757047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/7325597703666757047'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2010/05/using-phps-xmlwriter-to-create-basic.html' title='Using PHP&apos;s XMLWriter to create a basic Google SiteMap'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-8156497581811861884</id><published>2010-05-01T08:46:00.004+01:00</published><updated>2010-05-01T11:15:49.828+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone Apps'/><category scheme='http://www.blogger.com/atom/ns#' term='web developers'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Becoming Mobile</title><content type='html'>It's been a while since I last added a post on to this blog, mainly because I have been very busy. I took on a full time PHP development role in September and left behind the world of search (for the time being) so that I can really push on with my career.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Anyway, down to business. I once thought that if I could master a web language then I could stick to that, work away day after day and life would be good. This was of course a feeling I had before I had actually learnt a language, before I had actually applied the skills in a real life situation.  This is now such a silly notion to me now that I cannot believe that I actually thought that, but I guess that is the benefit of hindsight. This is even more astonishing when you consider what the Internet is and how the very nature of the beast requires you to be fluid, adaptive and progressive. This now brings on to my next point. Mobile Apps. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I really do not want to talk about what I am going to do with them (in this post) yet, but as I have actually bought a Mac Mini to develop iPhone Apps I am sure I am going to have some great fun in doing so (but more on this later).  The main point of this post is to discuss why I made the decision to start building apps and continue on my learning spree that I have been on these last couple of years. The purchase of Mac while important, only served as a catalyst to get me thinking about this idea of &lt;b&gt;linked learning&lt;/b&gt; (a phrase I have coined for this post) and what the effect of learning one skill helps/drives to you to learning another.  If this makes no sense to you, then please let me explain:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Years ago I taught myself VBscript to run within the ASP environment. These scripts required the use of databases (new skill) which in turn required me to learn MS Access which in turn allowed me to create dynamic website. The need to learn how databases worked is the link I am referring to. The acquiring of knowledge for one subject turned into another. This is quite a short chain of events, mainly because  I came to the whole ASP game quite late, .Net was coming in and I considered learning that for a while but ended up choosing PHP instead.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is very much a stripped down version, but you will get the idea. The arrows are not literally a point from one skill to another, just merely a way of demonstrating movement.  If this was to be made a graphical representation then it would be more like a flow chart and many of the skill sets would be interlinked.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;PHP/MySQL Led to Programming Skills -&gt; OOP Theory -&gt; XML -&gt; javaScript&lt;/div&gt;&lt;div&gt;MySQL -&gt; Advanced Database SQL-&gt; Stored Procedures&lt;/div&gt;&lt;div&gt;Apache (running on windows) -&gt; Regular Expressions&lt;/div&gt;&lt;div&gt;javaScript -&gt; DOM knowledge -&gt; jQuery and other frameworks&lt;/div&gt;&lt;div&gt;Apache (Windows) -&gt; Apache running on Linux&lt;/div&gt;&lt;div&gt;Apache (Linux) -&gt; Linux web server setups -&gt; Linux OS&lt;/div&gt;&lt;div&gt;Linux OS -&gt; Application Languages (c++, python)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is not an exhaustive list, I could be here forever doing that. I would also have to decide at which point does each skill set become its own subset.  Also, just because one skill has fired another it doesn't mean that its parent subject has been exhausted. This is especially true with something like Linux, which is a huge topic and will take years to master. The problem with this linked learning is that fact you may spread yourself a little thin. While I can apply all the skills mentioned above I am always new things about each one. In addition, as the skills are inter-related, it generally (though not always) makes each new skill all that bit easier. For example, once I had learnt PHP, I found C++ much easier as many of the constructs are similar in nature.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Does this post apply to other areas, of course. You could apply it to just about anything, if you have a similar experience then please think back. It may help you to [re]discover skills and improve your career prospects or just help you find some direction. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So what's next on the learning radar? Well, like I mentioned at the beginning of the post it is now Apple Apps for iPod and iPhone, so please watch this space as I be reporting on this once my shiny new Mac mini arrives and I learn how to use OSX (oops another new skill), it's a good job I know how to use Linux as I hear they have many things in common ;-)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-8156497581811861884?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/8156497581811861884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2010/05/becoming-mobile.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/8156497581811861884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/8156497581811861884'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2010/05/becoming-mobile.html' title='Becoming Mobile'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-2096239391140963011</id><published>2010-04-30T10:45:00.001+01:00</published><updated>2010-04-30T10:47:28.058+01:00</updated><title type='text'>This blog has moved</title><content type='html'>&lt;br /&gt;       This blog is now located at http://firmy007.blogspot.com/.&lt;br /&gt;       You will be automatically redirected in 30 seconds, or you may click &lt;a href='http://firmy007.blogspot.com/'&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;       For feed subscribers, please update your feed subscriptions to&lt;br /&gt;       http://firmy007.blogspot.com/feeds/posts/default.&lt;br /&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-2096239391140963011?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://firmy007.blogspot.com/' title='This blog has moved'/><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/2096239391140963011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2010/04/this-blog-has-moved.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/2096239391140963011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/2096239391140963011'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2010/04/this-blog-has-moved.html' title='This blog has moved'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-1850324834869434759</id><published>2009-07-30T12:44:00.000+01:00</published><updated>2009-07-30T12:45:08.908+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Bing'/><category scheme='http://www.blogger.com/atom/ns#' term='Search Engines'/><category scheme='http://www.blogger.com/atom/ns#' term='SEO'/><category scheme='http://www.blogger.com/atom/ns#' term='Google'/><category scheme='http://www.blogger.com/atom/ns#' term='Yahoo'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft'/><title type='text'>Bing and Yahoo to Merge - My thoughts</title><content type='html'>&lt;h1&gt;My thoughts on the new Search Engine Service from Bing/Yahoo&lt;/h1&gt;&lt;div&gt;I recently reported on this in my site's news section to read that post, please go &lt;a href="http://www.thefirmy.co.uk/News/Microsoft_Bing_Yahoo_Merge/"&gt;here&lt;/a&gt;&lt;/div&gt;&lt;p&gt;We all know that competition is good in any market and I think that if Microsoft's Bing and Yahoo can create a real rival to Google then it will be good for the state of Internet. It's not that I am anti-Google, I the contrary I like it. I use many Google services, not just the search engine, but also Spreadsheets that I need to keep at a centralised location, as well as other services like the GoogleMail and Blogger. &lt;/p&gt;&lt;p&gt;Another point that I would like to make, that unlike many other industries, where one major player is dominant (i.e. a monopoly) Google does not seem to take its customers for granted. They have realised that people can quickly move from one Search Engine to another and that they must continue to offer more and more services to make sure they remain on top.&lt;/p&gt;&lt;p&gt;I have to say that I think this could be good for the industry as a little competition never hurt anyone and that it could really could improve. Knowing Google though, they will probably already making plans to make sure they remain on top and are probably relishing the challenge this new rival offers.&lt;/p&gt;&lt;p&gt;How this will affect the Search Engine Industry and those who work in it, only time will tell. I work within the SEO industry and at the moment, nearly all the focus of our work points towards Google and not either Yahoo or Bing, this will now, no doubt change.&lt;/p&gt;&lt;p&gt;I do add one note of caution to those who want MS to succeed against Google. Remember that when Microsoft obtain market dominance (like they did in the browser wars of 90's or the home PC software market)  competition can suffer - something that no one would like to see in the world of the Internet, least of all me.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-1850324834869434759?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/1850324834869434759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2009/07/bing-and-yahoo-to-merge-my-thoughts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/1850324834869434759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/1850324834869434759'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2009/07/bing-and-yahoo-to-merge-my-thoughts.html' title='Bing and Yahoo to Merge - My thoughts'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-4754555399877925507</id><published>2009-07-15T12:32:00.000+01:00</published><updated>2009-07-15T12:33:44.330+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='tools'/><category scheme='http://www.blogger.com/atom/ns#' term='web developers'/><category scheme='http://www.blogger.com/atom/ns#' term='CSS'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><title type='text'>Essential tools for PHP web developers</title><content type='html'>Essential tools for PHP web developers&lt;br /&gt;&lt;br /&gt;I hope you enjoyed the book list, here are some of my recommendations for software to use when you develop your applications.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Editing Software&lt;/span&gt;&lt;br /&gt;I use an excellent named PHPED IDE from &lt;a href="http://www.nusphere.com/"&gt;NuSphere&lt;/a&gt;. It is very well priced and it has some brilliant features including intellisense and will pick up all classes, objects, methods, properties, variables and functions that are available to the page you work on. It also has support for CSS, Javascript, Perl and Smarty Templates. The installation also comes with a debug software and a few other tricks and whistles. I see it as an essential tool for anyone coding PHP on a PC. Find out more at nusphere.com&lt;br /&gt;&lt;br /&gt;Primarlily I am a PC user, whether it be Linux or Windows, I like using PCs and my reasons go beyond this article. However I am not averse to new ideas or opinions and I have heard from many people that there is an editor called &lt;a href="http://www.barebones.com/products/bbedit/"&gt;BBEdit&lt;/a&gt; by barebones sofware for OSX, unfortunately I have never tried it and cannot comment, but if you have the means, then please do so.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Browsers&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I have chosen Firefox as an essential tool for a number of reasons. It has great support for CSS, is secure and is updated on a very regular basis. However, these are not the only reasons for me choosing this program. The other reason is that is has support for add-ons (little additions written by 3rd part developers) which I now consider to be essential.&lt;br /&gt;&lt;br /&gt;Here are my list Firefox add-ons that I use:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Firebug - great for looking at problems and properties of the DOM or Javascript. Has an excellent JavaScript console which is brilliant for debugging scripts. Has so many different options that it would be pointless to go through them here. Find out more &lt;a href="https://addons.mozilla.org/firefox/addon/1843"&gt;here&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Web Developer - Adds new menus so that you can view CSS properties, JavaScript, Image Info... Again too much to list, so please go &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/60"&gt;here&lt;/a&gt; for more info.&lt;/li&gt;&lt;li&gt;Live HTTP headers - Allows you to view header information as it happens. Great tool for looking at information sent by the server. Find out more &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/3829"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Internet Explorer - The other browser I must add here is IE. It is not the best browser in the world, but the market place deems it to be essential as it is still the dominant browser on the market. Your client based scripts, HTML and apps could many great things but if they do not work in IE then they are not going to gain popularity. In fairness to Microsoft they have done their best to iron out many of the CSS problems that has caused issues in the past. I tend to develop my apps using FF as the main browser. Once I'm happy with a page or the area I have been working, I always give it a test in IE to make sure it all renders properly.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;    If you really do not want to use Internet Explorer, then there is an option for those with a love of Firefox. You can actually download an addon that will simulate IE within FF. To find out more, please go here.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;The obvious choices:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You of course must have an installed &lt;a href="http://www.php.net/"&gt;PHP&lt;/a&gt; installed on your system. With most Linux distributions, the packages can be added at installation or later. You will also need &lt;a href="http://www.mysql.com/"&gt;MySQL&lt;/a&gt; installed as well, again if you do know how to do this or do not feel comfortable adding to a Linux system it can be tricky. In terms of the Operating System, PHP is a very versatile piece of software and can be installed to be used with either Apache in Linux or on Windows or it can be even installed on IIS in Windows. It is your choice to make and should be made according to your ability at using these Operating Systems.&lt;br /&gt;&lt;br /&gt;Unfortunately for people who want to use PHP or MySQL  in a Linux installation is beyond the scope of this article. However for those who want to use Windows, there is a simple alternative called WAMP and that can be downloaded &lt;a href="http://www.wampserver.com/en/"&gt;here&lt;/a&gt;. It installs and configures all the things you need and can get you up and running very quickly. The components that can be installed on Windows include Apache Web Server, MySQL and PHP (WAMP) and once added, you do have a fully working web server.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Reference Manuals/Books&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;PHP.net - &lt;a href="http://www.php.net/manual/en/"&gt;the PHP Manual&lt;/a&gt; - complete reference to everything in the PHP Language&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.w3schools.com/"&gt;W3 schools&lt;/a&gt; - Excellent reference for HTML and JavaScript properties/methods&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.amazon.com/JavaScript-Bible-Danny-Goodman/dp/0470069163/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1247654075&amp;amp;sr=8-1"&gt;JavaScript Bible &lt;/a&gt;- great JavaScript reference book&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.amazon.com/PHP-Object-Oriented-Solutions-David-Powers/dp/1430210117/ref=sr_1_5?ie=UTF8&amp;amp;s=books&amp;amp;qid=1247653972&amp;amp;sr=8-5"&gt;PHP OOP solutions&lt;/a&gt; - still a great book (chapter 2 especially) to refer to&lt;/li&gt;&lt;/ul&gt;Hope these recommendations help and happy coding...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-4754555399877925507?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/4754555399877925507/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2009/07/essential-tools-for-php-web-developers_5404.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/4754555399877925507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/4754555399877925507'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2009/07/essential-tools-for-php-web-developers_5404.html' title='Essential tools for PHP web developers'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-7670495567962591255</id><published>2009-07-15T12:31:00.000+01:00</published><updated>2009-07-15T12:31:36.720+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><category scheme='http://www.blogger.com/atom/ns#' term='web development'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='developers'/><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='books'/><category scheme='http://www.blogger.com/atom/ns#' term='beginners'/><category scheme='http://www.blogger.com/atom/ns#' term='OOP'/><category scheme='http://www.blogger.com/atom/ns#' term='applications'/><title type='text'>My PHP development Book List (Advanced)</title><content type='html'>&lt;h1&gt;Advance your PHP knowledge...&lt;/h1&gt;I hope you all enjoyed my recommendations on &lt;a href="http://www.thefirmy.co.uk/blog/2009/07/my-php-development-book-list.html"&gt;PHP books for beginners&lt;/a&gt;. I now give you my list for more advanced books that will take you further into the world of PHP programming and development.&lt;br /&gt;&lt;br /&gt;1. I touched upon this book in the beginners book list, but feel like it should be mentioned upon more here. Advanced PHP 5 by Larry Ullman would be the first book I would start to read if I was to go in to more Advanced PHP 5 programming and the reasons are as follows. It has great reference chapters on XML, Ajax and OOP - all of which I would recommend you move on to with more detailed books (some of which are listed below).  Each chapter is (relatively) light weight and will give you a good grounding in the subject.&lt;br /&gt;&lt;br /&gt;2. The next book I would take a look at is PHP Object-Oriented Solutions by David Powers for friends of Ed.  This is a brilliant book, I didn't learn OOP from this book, but from looking at it retrospectively I wished I had. It's great book to learn from and (chapter 2 especially) works as a great reference manual should you need it.&lt;br /&gt;&lt;br /&gt;You quickly realise when you are building your applications that you often have retype lots and lots of code. OOP is based on code reusability and modularity so that once you have classes in place, the hard work is done. OOP is also good for those who have to keep one eye on the profitability of their business i.e. free lance developers. With OOP in PHP, you can use common classes so that your time can be utilised in a more efficient manner.&lt;br /&gt;&lt;br /&gt;I recommend OOP to all people learning PHP, it may take you more time in the early stages when you are designing and building your class, but once the classes are finished you will find your projects running far smoother. Getting one's head around OOP can be tricky so, unless you can do it in another language I would leave this until you really feel comfortable with the language before you proceed.&lt;br /&gt;&lt;br /&gt;3. To learn Ajax with PHP I would use Ajax And PHP Building Responsive Web Applications by Cristian Darie et. all. If you managed to master many of the concepts in JavaScript and PHP then this shouldn't be too hard a book to digest.  Not only does teach you about Ajax and how to use it with PHP and MySQL, it also gives you real life examples of concepts that can be used in most modern websites.&lt;br /&gt;&lt;br /&gt;N.B. I would suggest that you work through at least some of the chapters in the previous book as this Ajax book does use PHP OOP concepts.&lt;br /&gt;&lt;br /&gt;Ajax is a brilliant concept and again, it is something that I would recommend all developers to at least try. Not only does it add that all important visual flair to pages, it also has other benefits too. If server loads are an issue, either through the amount of data or instructions they can handle it helps as only the parts of a page that are needed are sent from the server, rather than the server having to send the whole page again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-7670495567962591255?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/7670495567962591255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2009/07/my-php-development-book-list-advanced.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/7670495567962591255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/7670495567962591255'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2009/07/my-php-development-book-list-advanced.html' title='My PHP development Book List (Advanced)'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-2460888154162380223</id><published>2009-07-14T12:45:00.006+01:00</published><updated>2010-06-10T21:44:04.084+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='web development'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='XHTML'/><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='CSS'/><category scheme='http://www.blogger.com/atom/ns#' term='OOP'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><title type='text'>My PHP development Book List (Beginners)</title><content type='html'>&lt;h1&gt;Learning PHP and web development from scratch...&lt;/h1&gt;Learning a new language can be difficult, especially when you haven't got someone looking over your shoulder trying to help you. That is why we have text books and believe me, some are definitely better than others.  This is not just a statement based on 1 example, there were numerous times throughout my time at university that we were given a recommended reading list and the books that were supposed to help, were in fact just being endorsed by some unscrupulous lecturer who wanted to line their pockets - though this could never be proven. If you are reading this as a student, then please before you buy a book that has been 'recommended' take a look at some reviews on web sites that are freely available, after all £30 of your loan cheque is quite sizeable. I have numerous books that were truly awful and have never seen the light of day since the 13 times I attempted to read them.&lt;br /&gt;&lt;br /&gt;Anyway, back to the subject at hand:&lt;br /&gt;&lt;br /&gt;Here are a list of books I would use to start learning PHP and web development from scratch. You may disagree with me and that's fine, I may open comments on this post, so please do leave me your choices.  You may find that I recommend the same published on numerous occasions, I am endorsing any published over another and all recommendations are purely my opinion based on my own experiences.&lt;br /&gt;&lt;br /&gt;1. Start at the beginning - Learn (X)HTML - I was a fresh faced first year when I started learning HTML and loved it almost immediately. I had never done any real programming at this point and found it awe inspiring that you could write something in Notepad, refresh it in a browser and there you go, rendered immediately and outputting your thoughts to the world.  The book I used for this was by a lady named Elizabeth Castro called 'HTML 4 for the World Wide Web' which was published in 1999 by Peachpit Press. It has of course been updated for the modern age of W3C standards and is now called HTML, XHTML, and CSS by the same author. This is a fantastic book, moves a manageable pace and unlike then will help you learn HTML and CSS all in one go, rather than how I learnt the two technologies years ago when CSS was just a bit of an extra to be used in your HTML. Technically HTML isn't programming, you are writing Markup but it will get used to many things that as a programmer will be using later on in your career i.e. attributes, properties (in CSS) and referencing different parts of your code.&lt;br /&gt;&lt;br /&gt;2. It's another Peachpit publication, this time from Larry Ullmang.  &lt;a href="http://www.amazon.co.uk/PHP-MySQL-Dynamic-Web-Sites/dp/032152599X/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1276202525&amp;amp;sr=8-1"&gt;PHP  and MySQL&lt;/a&gt; is now in its third editon and is still going strong. I have had to buy this a couple of times (different editions) as I still use for it a little bit of reference. My first edition was worn out very quickly, constant flicking through the pages and index to find what I need took its toll and as a result my first copy is in numerous parts.&lt;br /&gt;&lt;br /&gt;Larry is a great programmer and teacher (as I have mentioned in other posts) as he can teach without laying too much on the student. He also has another more advanced PHP book which will advance your knowledge over a number of key subjects, i.e. OOP in PHP and Ajax with PHP. I would recommend that you build a number of sites first before you tackle that book as it can be heavy going in places. The advanced book is definitely more of reference manual and can be dipped in and out of, rather than the PHP MySQL which I would recommend reading in its natural order.&lt;br /&gt;&lt;br /&gt;3. Now that you have hopefully sites coming together. I would recommend taking a look at JavaScript. Javascript has had its ups and downs (mainly due to unscrupulous coders and hackers) but has since had a well deserved revival. I like Javascript, it adds an extra dimension to a web site and makes a site feel more like a desktop application than a website (even more so when Ajax is used). However it can be a quirky language, some of the naming and referencing conventions can be tricky, but once you get the hang of it, you will love it.&lt;br /&gt;&lt;br /&gt;JavaScript as well as being a programming language for your browser, it also gives you access to the DOM (Document Object Model) and when you learn to manipulate it, can give you some really impressive looking results.&lt;br /&gt;&lt;br /&gt;The reason I have added Javascript after PHP is that it looks rather similar to PHP in terms of the code and that with PHP you only have to worry about 2 or 3 real events. Page Load and then GET and POST. JavaScript has many more events and uses objects (HTML elements etc) to add to its functionality.&lt;br /&gt;&lt;br /&gt;So the book I recommend for learning JavaScript is the JavaScript Bible (now in its 6th edition) by Danny Goodman et al.  A brilliant book, set a good pace and has a massive reference section for you to look almost every property, method and attrbute in the language. It also teaches you about the DOM and how to create scripts that affect it, so is a very good all round.&lt;br /&gt;&lt;br /&gt;There are more books that I have used but I will talk about them in my next post. These books will move in to more advanced areas including Object Oriented Programming, Ajax and a few other areas.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-2460888154162380223?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/2460888154162380223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2009/07/my-php-development-book-list.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/2460888154162380223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/2460888154162380223'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2009/07/my-php-development-book-list.html' title='My PHP development Book List (Beginners)'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-6709829997580729050</id><published>2009-07-10T12:59:00.007+01:00</published><updated>2009-07-10T20:49:53.127+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><category scheme='http://www.blogger.com/atom/ns#' term='web development'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='CSS'/><category scheme='http://www.blogger.com/atom/ns#' term='dreamweaver'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><title type='text'>Dreamweaver - an excellent way to start your web development career</title><content type='html'>My love/hate relationship with Macromedia/Adobe Dreamweaver&lt;br /&gt;&lt;br /&gt;I have since moved on from Dreamweaver but for some jobs it is still a very useful tool. A lot of pro developers hate Dreamweaver and in many cases they have a point. However like many things in life, when people get an idea or an opinion it can be very hard to change. I feel like I am an open minded person that believes in using the right tool for the right job.&lt;br /&gt;&lt;br /&gt;Dreamweaver is an excellent program created by a great time of programmers and designers. It has a fantastic interface and it makes site creation available to the masses. When I first started using DW I thought the program was amazing and I was very impressed with how well it created dynamic pages with such a minimum of effort. Also it gives a person a very good look at how server pages work along with some basic interaction with databases and really does ease them in to the whole server side world of the web. It has been created to use many different models including ASP[.net] with MS SQL Server or Access; PHP with MySQL on different servers including IIS and Apache and is therefore a very adaptable piece of software.&lt;br /&gt;&lt;br /&gt;Dreamweaver also allowed you to use the WYSIWYG side that allowed you to combine the design and the server side parts all on one page.  This was indispensible for a person who had some HTML experience but hardly any server coding experience.&lt;br /&gt;&lt;br /&gt;OK, on to the bad points. For people who can code their own apps in a server side language this piece of software will no doubt infuriate them. It writes a lot of code (sometimes needlessley) and creates huge amounts of script to do some very simple operations. This is Dreamweaver's main issue for seasoned developers and like I said it is understandable, but if used sensibly Dreamweaver can still have its place in a developers arsenal.&lt;br /&gt;&lt;br /&gt;It is also is quite inflexible with the way creates files in to its structure that it uses for database connections - but this is only a minor issue.&lt;br /&gt;&lt;br /&gt;I mentioned on the blog front page that I hope to use this blog to help a business be more profitable. Dreamweaver fits in to this idea perfectly. As a developer, a significant amount of time can be used on the inital stages when design meets the site structure. You can create classes, functions and all manner of time saving techniques to try and make site development more streamlined but if you want to speed up this stage I still stick by Dreamweaver.  One of Dreamweaver's finest tools is its ability to help you create CSS and how it can fit in to your site development. CSS in Dreamweaver will allow you to (when your elements are in place) to add an atribute and it will allow you to see immediately how it affects the site's layout rather than loading and refreshing in a browser. If you are creating a site that uses a non-standard layout, this is a fantastic way to do things and will no doubt help you at many stages in the design/structure. Of course you need a fairly good understanding of CSS, but once you have that - page layout becomes a whole lot easier.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-6709829997580729050?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/6709829997580729050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2009/07/dreamweaver-excellent-way-to-start-your.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/6709829997580729050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/6709829997580729050'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2009/07/dreamweaver-excellent-way-to-start-your.html' title='Dreamweaver - an excellent way to start your web development career'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-3652036209347602101</id><published>2009-07-10T12:33:00.003+01:00</published><updated>2009-07-10T12:51:15.846+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><category scheme='http://www.blogger.com/atom/ns#' term='web development'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='arrays'/><category scheme='http://www.blogger.com/atom/ns#' term='functions'/><title type='text'>PHP - A New Start in my development</title><content type='html'>Using PHP to develop websites&lt;br /&gt;&lt;br /&gt;So here I was, a brand new book (PHP 4/MySQL by Larry Ullman for Peachit Press) in front that promised me how to learn PHP and create dynamic websites. I had, of course already created dynamic website using classic ASP but I wanted to use PHP and use it well. Many of the concepts mentioned early on in the book just reiterated how to do things that were already common to most programming languages. The common if, else, echo and so on and so forth and these chapters were a breeze and I sailed through the first few chapters in a matter of hours.&lt;br /&gt;&lt;br /&gt;However when I started to meet new ideas and concepts I was starting to slow down as the new information had to absorbed and understood for future use. Things like arrays and functions were, though not ultra complicated were new to me as I had learnt ASP in such a disjointed way that this new approach was very heavy going.&lt;br /&gt;&lt;br /&gt;With functions in PHP there were new ideas and concepts that had to be understood - like variables within a functions, parameters and the idea of whether or not it is even worth writing the function in the first place! When it came to arrays and using them in PHP, this was such a refreshing change. I had used arrays in ASP but they were, I felt a little clunky, with PHP they feel flexible and you can manipulate them in so many ways (thanks to PHP's inbuilt functions).&lt;br /&gt;&lt;br /&gt;I have to say Larry Ullman is an excellent teacher and his books are very, very good and without him I think learning PHP would have been a lot more difficult, so thanks go out to him. I have bought many of his books and it's a testament to his skill at writing technical text books that I keep buying updated versions as there are so many useful bits of information in them.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-3652036209347602101?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/3652036209347602101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2009/07/php-new-start-in-my-development.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/3652036209347602101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/3652036209347602101'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2009/07/php-new-start-in-my-development.html' title='PHP - A New Start in my development'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-279190662218557677</id><published>2009-07-09T12:42:00.008+01:00</published><updated>2009-07-10T10:00:13.980+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='web development'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='learning'/><category scheme='http://www.blogger.com/atom/ns#' term='OOP'/><category scheme='http://www.blogger.com/atom/ns#' term='Lancashire'/><title type='text'>On the road to becoming a PHP developer</title><content type='html'>My Learning Curve on the road to becoming a web developer living in Burnley, Lancashire...&lt;br /&gt;&lt;br /&gt;When I came to web programming my background primarily lied in SEO, but thanks to the requests of my employer I found myself having to learn (Classic) ASP using VBScript as he needed a specific application to be built in-house. This was a bold step from my employer but he must have seen that I had the ability to learn this [archaic] language and allow me the time to start down the programming/scripting road. I felt I was up to the challenge as I had played with a couple of languages at University including C++, JavaScript and HTML and therefore proceeded on to the aforementioned project.&lt;br /&gt;&lt;br /&gt;Fortunately, prior to this I had already become proficient in the use of the application Dreamweaver by Macromedia. When I started to create server side apps using Dreamweaver it became apparent that, whilst Dreamweaver was excellent at creating server scripts for beginners it was creating extremely bloated scripts. Now this is not, I repeat not, a slur on Macromedia/Adobe as I realised that the scripts had to be like this to make sure they worked on nearly all servers/machines as a newbie wouldn't have the know-how to fix and issues that cropped up.&lt;br /&gt;&lt;br /&gt;In conjunction with the ASP VBScript server, I learnt MS Access - one of many the many choices you can use with DW. Again I had a little knowledge of SQL and of RDBMS (Relational Database Management Systems) from university when I used a very old language called clipper. As a result I found it to be no real problem using the comparatively ultra modern MS Access. After a few weeks of creating this in-house application I was creating session based pages, login scripts and many other components all based around common programming techniques i.e. if, else, then etc. etc. It was also at this point I noticed that ASP/VB used a small number of Objects/classes to build its server connections and saw the obvious benefits they offered - but more on Object Oriented Programming (OOP) later.&lt;br /&gt;&lt;br /&gt;I decided to learn a new language and really try develop my skills as a developer. I also knew at this point that Classic ASP was never going to cut it as a language to take my forward in my career (especially as one of my friends was raving about .NET) and I had to make a decision on which language to use for my web development projects. I looked at the options and chose PHP (which was being championed by a colleague) which was standing at version 5. I looked at all the articles I could find and made my decision and decided to use PHP rather .NET. There were reasons for this and they are listed below:&lt;br /&gt;&lt;br /&gt;1. It was open source and cheap to create a working server using Linux/Apache at home compared to IIS/Windows Server.&lt;br /&gt;2. The language - Most of my prior knowledge had been in writing procedural code instead of using OOP and I thought PHP was a better choice as it gave me the choice to do both. PHP was at version 4.xx and did have a limited support for OOP and with PHP 5 (which had much better support for OOP) on the horizon it became the deciding factor.&lt;br /&gt;3. The PHP manual - a complete and definitive source for every function in the PHP language with user contributed notes. From my ASP/VB script days I knew that whilst Microsoft did its best to maintain its support, pages were often moved and I found myself going round in cirlces.&lt;br /&gt;4. I could step up to using OOP when I felt I was ready and not from the outset.&lt;br /&gt;5. SEO was in grained in me and I knew that PHP was proven when it came to creating more Search Engine friendly pages.&lt;br /&gt;6. MySQL was free and MS SQLServer was (back then) very, very expensive and cost way beyond what I was earning. -- Edit -- In fairness to MS you can now download free (albeit limited) versions of Visual Studio and the MS SQL server interface.&lt;br /&gt;&lt;br /&gt;These are only a few of reasons I chose PHP over .NET, but over the rest of my posts you will see how I moved on and I hope that my posts can try and help you become more than you are at the moment. I will list books, resources and a few other snippets to try and make your career/hobby that little bit better :-)&lt;br /&gt;&lt;br /&gt;For people who are a little more interested in how PHP and how OOP and developing re-usable sites/models can contribute towards a more profitable business there will be plenty here for you too. After all, a large majority of websites are used to create profits and the more you can squeeze out of them the better.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-279190662218557677?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/279190662218557677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2009/07/my-learning-curve.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/279190662218557677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/279190662218557677'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2009/07/my-learning-curve.html' title='On the road to becoming a PHP developer'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8819756027609406389.post-219966411730514947</id><published>2008-10-22T10:26:00.000+01:00</published><updated>2008-10-22T10:27:12.159+01:00</updated><title type='text'>Welcome</title><content type='html'>Welcome to my Blog&lt;br /&gt;&lt;br /&gt;Firmy&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8819756027609406389-219966411730514947?l=firmy007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://firmy007.blogspot.com/feeds/219966411730514947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://firmy007.blogspot.com/2008/10/welcome.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/219966411730514947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8819756027609406389/posts/default/219966411730514947'/><link rel='alternate' type='text/html' href='http://firmy007.blogspot.com/2008/10/welcome.html' title='Welcome'/><author><name>firmy007</name><uri>http://www.blogger.com/profile/09474324873454192980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
