<?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-1294271072281166640</id><updated>2012-01-04T00:15:05.372+02:00</updated><category term='php smarty'/><category term='apache'/><category term='php classes'/><category term='articles'/><category term='jquery'/><category term='javascript'/><category term='tutorials'/><category term='mysql'/><category term='smarty'/><category term='php'/><category term='tips and tricks'/><category term='html'/><category term='upload'/><category term='htaccess'/><category term='pear'/><category term='mod rewrite'/><title type='text'>PHP Articles. MySQL Articles</title><subtitle type='html'>Your expert in PHP and MySQL. Articles and tutorials on this website contain code examples.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>blogadmin</name><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>45</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1294271072281166640.post-8363358347609907925</id><published>2010-03-19T16:35:00.002+02:00</published><updated>2010-03-19T16:39:21.400+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jquery'/><title type='text'>jQuery scroll to element</title><content type='html'>Here's a simple way to auto scroll to an element of the page really nice.&lt;br /&gt;&lt;br /&gt;First you have to add this piece of code (of couse jQuery library must be included in your source code):&lt;br /&gt;&lt;br /&gt;jQuery.fn.extend({&lt;br /&gt;  scrollTo : function(speed, easing) {&lt;br /&gt;    return this.each(function() {&lt;br /&gt;      var targetOffset = $(this).offset().top;&lt;br /&gt;      $('html,body').animate({scrollTop: targetOffset}, speed, easing);&lt;br /&gt;    });&lt;br /&gt;  }&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;And then you just scroll to an element id:&lt;br /&gt;&lt;br /&gt;$('#element_id').scrollTo(1000);&lt;br /&gt;&lt;br /&gt;You can speed up the scrolling by reducing the scroll time. Eg. scrollTo(100)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-8363358347609907925?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/8363358347609907925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=8363358347609907925' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/8363358347609907925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/8363358347609907925'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2010/03/jquery-scroll-to-element.html' title='jQuery scroll to element'/><author><name>blogadmin</name><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-1294271072281166640.post-2262704382739099555</id><published>2010-03-04T12:13:00.003+02:00</published><updated>2010-03-04T12:17:27.808+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>PHP log errors to log file</title><content type='html'>Logging PHP errors to a log file is critical. You don't want to display PHP errors or warnings to users, but to log all errors to a file that you can view. This way you can fix all errors, warnings, notices and the client won't see any PHP error.&lt;br /&gt;&lt;br /&gt;You can easily do this by adding two lines at the beginning of your code:&lt;br /&gt;&lt;br /&gt;ini_set('log_errors', 1);&lt;br /&gt;ini_set('error_log', '/path-to/error_log.file');&lt;br /&gt;&lt;br /&gt;You can use later any editor to view contents of your log file and fix all problems that occured.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-2262704382739099555?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/2262704382739099555/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=2262704382739099555' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/2262704382739099555'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/2262704382739099555'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2010/03/php-log-errors-to-log-file.html' title='PHP log errors to log file'/><author><name>blogadmin</name><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-1294271072281166640.post-3321403445489846041</id><published>2010-02-10T11:21:00.002+02:00</published><updated>2010-02-10T11:23:41.937+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>PHP date/time difference</title><content type='html'>I have found a great function that returns the difference in days, hours and minutes between 2 dates.&lt;br /&gt;&lt;br /&gt;Here is the link, works like a charm:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.gidnetwork.com/b-16.html"&gt;http://www.gidnetwork.com/b-16.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For example, this function can be used for events, to know how much time is left until the next event.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-3321403445489846041?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/3321403445489846041/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=3321403445489846041' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/3321403445489846041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/3321403445489846041'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2010/02/php-datetime-difference.html' title='PHP date/time difference'/><author><name>blogadmin</name><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-1294271072281166640.post-2381412173594364674</id><published>2009-08-25T23:33:00.002+03:00</published><updated>2009-08-25T23:36:55.863+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>File_Get_Contents replacement  (CURL)</title><content type='html'>Some servers have file_get_contents function disabled. But don't worry, most of them have curl library installed. Here is a replacement function for file_get_contents, using CURL library. Easy and working:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: -webkit-monospace; font-size: 12px; line-height: 14px; white-space: pre;"&gt;&lt;ol style="margin: 0px 0px 0px 30px; padding: 0px; list-style-type: decimal; line-height: 1.22em; color: black;"&gt;&lt;li class="li1" style="margin: 0px 0px 0px 10px; padding: 0px; line-height: 1.22em;"&gt;&lt;div class="de1" style="margin: 0px; padding: 0px; line-height: 1.22em; color: rgb(0, 0, 139);"&gt;&lt;span class="kw2" style="line-height: 1.22em; color: green;"&gt;function&lt;/span&gt; file_get_contents_curl&lt;span class="br0" style="line-height: 1.22em; color: olive;"&gt;(&lt;/span&gt;&lt;span class="re0" style="line-height: 1.22em;"&gt;$url&lt;/span&gt;&lt;span class="br0" style="line-height: 1.22em; color: olive;"&gt;)&lt;/span&gt; &lt;span class="br0" style="line-height: 1.22em; color: olive;"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1" style="margin: 0px 0px 0px 10px; padding: 0px; line-height: 1.22em;"&gt;&lt;div class="de1" style="margin: 0px; padding: 0px; line-height: 1.22em; color: rgb(0, 0, 139);"&gt; &lt;span class="re0" style="line-height: 1.22em;"&gt;$ch&lt;/span&gt; &lt;span class="sy0" style="line-height: 1.22em;"&gt;=&lt;/span&gt; curl_init&lt;span class="br0" style="line-height: 1.22em; color: olive;"&gt;(&lt;/span&gt;&lt;span class="br0" style="line-height: 1.22em; color: olive;"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1" style="margin: 0px 0px 0px 10px; padding: 0px; line-height: 1.22em;"&gt;&lt;div class="de1" style="margin: 0px; padding: 0px; line-height: 1.22em; color: rgb(0, 0, 139);"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li class="li1" style="margin: 0px 0px 0px 10px; padding: 0px; line-height: 1.22em;"&gt;&lt;div class="de1" style="margin: 0px; padding: 0px; line-height: 1.22em; color: rgb(0, 0, 139);"&gt; curl_setopt&lt;span class="br0" style="line-height: 1.22em; color: olive;"&gt;(&lt;/span&gt;&lt;span class="re0" style="line-height: 1.22em;"&gt;$ch&lt;/span&gt;&lt;span class="sy0" style="line-height: 1.22em;"&gt;,&lt;/span&gt; CURLOPT_HEADER&lt;span class="sy0" style="line-height: 1.22em;"&gt;,&lt;/span&gt; &lt;span class="nu19" style="line-height: 1.22em;"&gt;0&lt;/span&gt;&lt;span class="br0" style="line-height: 1.22em; color: olive;"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1" style="margin: 0px 0px 0px 10px; padding: 0px; line-height: 1.22em;"&gt;&lt;div class="de1" style="margin: 0px; padding: 0px; line-height: 1.22em; color: rgb(0, 0, 139);"&gt; curl_setopt&lt;span class="br0" style="line-height: 1.22em; color: olive;"&gt;(&lt;/span&gt;&lt;span class="re0" style="line-height: 1.22em;"&gt;$ch&lt;/span&gt;&lt;span class="sy0" style="line-height: 1.22em;"&gt;,&lt;/span&gt; CURLOPT_RETURNTRANSFER&lt;span class="sy0" style="line-height: 1.22em;"&gt;,&lt;/span&gt; &lt;span class="nu0" style="line-height: 1.22em; color: maroon;"&gt;1&lt;/span&gt;&lt;span class="br0" style="line-height: 1.22em; color: olive;"&gt;)&lt;/span&gt;;&lt;span class="co1" style="line-height: 1.22em; color: orange;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1" style="margin: 0px 0px 0px 10px; padding: 0px; line-height: 1.22em;"&gt;&lt;div class="de1" style="margin: 0px; padding: 0px; line-height: 1.22em; color: rgb(0, 0, 139);"&gt; curl_setopt&lt;span class="br0" style="line-height: 1.22em; color: olive;"&gt;(&lt;/span&gt;&lt;span class="re0" style="line-height: 1.22em;"&gt;$ch&lt;/span&gt;&lt;span class="sy0" style="line-height: 1.22em;"&gt;,&lt;/span&gt; CURLOPT_URL&lt;span class="sy0" style="line-height: 1.22em;"&gt;,&lt;/span&gt; &lt;span class="re0" style="line-height: 1.22em;"&gt;$url&lt;/span&gt;&lt;span class="br0" style="line-height: 1.22em; color: olive;"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1" style="margin: 0px 0px 0px 10px; padding: 0px; line-height: 1.22em;"&gt;&lt;div class="de1" style="margin: 0px; padding: 0px; line-height: 1.22em; color: rgb(0, 0, 139);"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li class="li1" style="margin: 0px 0px 0px 10px; padding: 0px; line-height: 1.22em;"&gt;&lt;div class="de1" style="margin: 0px; padding: 0px; line-height: 1.22em; color: rgb(0, 0, 139);"&gt; &lt;span class="re0" style="line-height: 1.22em;"&gt;$data&lt;/span&gt; &lt;span class="sy0" style="line-height: 1.22em;"&gt;=&lt;/span&gt; curl_exec&lt;span class="br0" style="line-height: 1.22em; color: olive;"&gt;(&lt;/span&gt;&lt;span class="re0" style="line-height: 1.22em;"&gt;$ch&lt;/span&gt;&lt;span class="br0" style="line-height: 1.22em; color: olive;"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1" style="margin: 0px 0px 0px 10px; padding: 0px; line-height: 1.22em;"&gt;&lt;div class="de1" style="margin: 0px; padding: 0px; line-height: 1.22em; color: rgb(0, 0, 139);"&gt; curl_close&lt;span class="br0" style="line-height: 1.22em; color: olive;"&gt;(&lt;/span&gt;&lt;span class="re0" style="line-height: 1.22em;"&gt;$ch&lt;/span&gt;&lt;span class="br0" style="line-height: 1.22em; color: olive;"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1" style="margin: 0px 0px 0px 10px; padding: 0px; line-height: 1.22em;"&gt;&lt;div class="de1" style="margin: 0px; padding: 0px; line-height: 1.22em; color: rgb(0, 0, 139);"&gt; &lt;/div&gt;&lt;/li&gt;&lt;li class="li1" style="margin: 0px 0px 0px 10px; padding: 0px; line-height: 1.22em;"&gt;&lt;div class="de1" style="margin: 0px; padding: 0px; line-height: 1.22em; color: rgb(0, 0, 139);"&gt; &lt;span class="kw1" style="line-height: 1.22em; color: green;"&gt;return&lt;/span&gt; &lt;span class="re0" style="line-height: 1.22em;"&gt;$data&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1" style="margin: 0px 0px 0px 10px; padding: 0px; line-height: 1.22em;"&gt;&lt;div class="de1" style="margin: 0px; padding: 0px; line-height: 1.22em; color: rgb(0, 0, 139);"&gt;&lt;span class="br0" style="line-height: 1.22em; color: olive;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Using this function is easy, just like file_get_contents function :&lt;br /&gt;&lt;br /&gt;$contents = file_get_contents_curl( 'http://...');&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-2381412173594364674?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/2381412173594364674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=2381412173594364674' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/2381412173594364674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/2381412173594364674'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2009/08/filegetcontents-replacement-curl.html' title='File_Get_Contents replacement  (CURL)'/><author><name>blogadmin</name><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-1294271072281166640.post-6749323970563220430</id><published>2009-08-04T23:25:00.002+03:00</published><updated>2009-08-04T23:27:34.726+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>PHPMailer UTF-8 messages</title><content type='html'>Sending UTF-8 body messages with PHPMailer is pretty easy. You just have to set charset&lt;br /&gt;&lt;br /&gt;Here is an example: $mail-&gt;CharSet = 'UTF-8';&lt;br /&gt;&lt;br /&gt;So now you can send utf-8 mail messages using PHPMailer. Good luck.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-6749323970563220430?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/6749323970563220430/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=6749323970563220430' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/6749323970563220430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/6749323970563220430'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2009/08/phpmailer-utf-8-messages.html' title='PHPMailer UTF-8 messages'/><author><name>blogadmin</name><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-1294271072281166640.post-7366240868034586995</id><published>2009-06-24T17:16:00.002+03:00</published><updated>2009-06-24T17:19:53.643+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>How to validate a hex color in PHP</title><content type='html'>Validating a hex color code in PHP is easy. &lt;br /&gt;&lt;br /&gt;Rules:&lt;br /&gt;&lt;br /&gt;Hex colors must start with '#' and have 6 characters.&lt;br /&gt;Hex colors can contain the following letters: [A-F]&lt;br /&gt;Hex colors can contain the following digits: [0-9]&lt;br /&gt;&lt;br /&gt;So using pregmatch, the hex validation code is:&lt;br /&gt;&lt;br /&gt;if(preg_match('/^#[a-f0-9]{6}$/i', $color))  //hex color is valid&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/1294271072281166640-7366240868034586995?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/7366240868034586995/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=7366240868034586995' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/7366240868034586995'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/7366240868034586995'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2009/06/how-to-validate-hex-color-in-php.html' title='How to validate a hex color in PHP'/><author><name>blogadmin</name><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-1294271072281166640.post-3464034890602219883</id><published>2009-06-23T14:30:00.003+03:00</published><updated>2009-06-23T14:32:32.676+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>PHP Upload and Image Manipulation Class</title><content type='html'>I've been looking for a simple to use class for uploading and manipulating images. And I have found it.&lt;br /&gt;&lt;br /&gt;Here it is: &lt;a href="http://www.verot.net/php_class_upload_overview.htm"&gt;http://www.verot.net/php_class_upload_overview.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can upload files, validate mime types, set language for errors. It's really easy to use. It's free for non-commercial applications.&lt;br /&gt;&lt;br /&gt;You can now easily upload and manipulate images (resize, watermark, etc) with this PHP class.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-3464034890602219883?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/3464034890602219883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=3464034890602219883' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/3464034890602219883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/3464034890602219883'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2009/06/php-upload-and-image-manipulation-class.html' title='PHP Upload and Image Manipulation Class'/><author><name>blogadmin</name><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-1294271072281166640.post-5808435577720785165</id><published>2009-05-10T19:52:00.003+03:00</published><updated>2009-05-10T20:00:59.162+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>PHP 301 redirect</title><content type='html'>301 redirect means "moved permanently"&lt;br /&gt;&lt;br /&gt;Every website has to have SEO onpage. That means sometimes you need 301 redirects, when you want to replace some url with a new url. How do you get 301 redirect in PHP? Using header function.&lt;br /&gt;&lt;br /&gt;Here is a simple example:&lt;br /&gt;&lt;br /&gt;header ('HTTP/1.1 301 Moved Permanently');&lt;br /&gt;header ('Location: '.$new_location);&lt;br /&gt;exit();&lt;br /&gt;&lt;br /&gt;This code must be used in the old file, that you want to remove from search engines. $new_location is the new path where the script is being redirected. exit() must be used to stop the script. &lt;br /&gt;Remember to not display anything (any HTML or other text sent to browser) before calling header() function. Or if you do, you can use output buffering to clear the output.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-5808435577720785165?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/5808435577720785165/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=5808435577720785165' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/5808435577720785165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/5808435577720785165'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2009/05/php-301-redirect.html' title='PHP 301 redirect'/><author><name>blogadmin</name><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-1294271072281166640.post-1557305189411209070</id><published>2009-05-04T11:05:00.004+03:00</published><updated>2009-05-04T11:11:32.599+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>PHP include path</title><content type='html'>&lt;h2&gt;How to set include path&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;Include path separator differs from one operating system to another. For Windows path separator is &lt;span style="font-weight:bold;"&gt;;&lt;/span&gt; and for unix separator is &lt;span style="font-weight:bold;"&gt;:&lt;/span&gt;. So how do you make your code create the right include path regardless of your OS?&lt;br /&gt;&lt;br /&gt;First, you detect server's OS:&lt;br /&gt;&lt;br /&gt;if (stristr(PHP_OS, 'WIN')) &lt;br /&gt;{&lt;br /&gt; $separator = ';';&lt;br /&gt;} &lt;br /&gt;else {&lt;br /&gt; $separator = ':';&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Then you set your classes path, for example:&lt;br /&gt;$yourpath = './classes';&lt;br /&gt;&lt;br /&gt;And then you add this path to include path:&lt;br /&gt;&lt;br /&gt;ini_set('include_path', ini_get('include_path') . $separator . $yourpath);&lt;br /&gt;&lt;br /&gt;This way, either your server is Windows or a Unix system, it will always include your path using the right separator character, and you don't have to change the code everytime you switch to another OS.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-1557305189411209070?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/1557305189411209070/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=1557305189411209070' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/1557305189411209070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/1557305189411209070'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2009/05/php-include-path.html' title='PHP include path'/><author><name>blogadmin</name><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-1294271072281166640.post-763834612926325423</id><published>2009-04-23T11:30:00.004+03:00</published><updated>2009-04-23T11:36:38.332+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Get file extension in PHP</title><content type='html'>Here are some simple ways to retrieve extension of a file using PHP. You need this when you try to validate file uploads, for example.&lt;br /&gt;&lt;br /&gt;So here is one simple way:&lt;br /&gt;&lt;br /&gt;$extension = end(explode(".", $filename ));&lt;br /&gt;&lt;br /&gt;Let's say we have: $filename = 'text.jpg' then the result will be jpg.&lt;br /&gt;&lt;br /&gt;Another way of getting file extension is using pathinfo() function:&lt;br /&gt;$fileinfo = pathinfo($filename);&lt;br /&gt;$extension = $fileinfo['extension'];&lt;br /&gt;&lt;br /&gt;And the third way:&lt;br /&gt;$extension = substr(strrchr($filename,'.'),1);&lt;br /&gt;&lt;br /&gt;I use the first method, works just fine. You can use what method you want to determine a file extension.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-763834612926325423?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/763834612926325423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=763834612926325423' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/763834612926325423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/763834612926325423'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2009/04/get-file-extension-in-php.html' title='Get file extension in PHP'/><author><name>blogadmin</name><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-1294271072281166640.post-5696961270068360009</id><published>2009-04-09T16:50:00.002+03:00</published><updated>2009-04-09T17:01:41.015+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Jquery ajax post form</title><content type='html'>How to post some data using jquery and ajax, and get the response in a div.&lt;br /&gt;&lt;br /&gt;First you'll need &lt;a href="http://docs.jquery.com/Downloading_jQuery#Download_jQuery"&gt;jquery library&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Then you'll need a html form:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script type="text/javascript" src="jquery.js&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;&lt;br /&gt;$(document).ready(function() {&lt;br /&gt;&lt;br /&gt; $("#btn").click(function(){&lt;br /&gt;&lt;br /&gt;     $.post("ajax.php",{&lt;br /&gt;         myfield: $("#myfield").val(),&lt;br /&gt;         action: "check"&lt;br /&gt;     }, function(msg) {&lt;br /&gt;         $("#msg").empty();&lt;br /&gt;         $("#msg").html(msg);&lt;br /&gt; });&lt;br /&gt;&lt;br /&gt; });&lt;br /&gt;&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;form action="" method="post"&amp;gt;&lt;br /&gt;&amp;lt;input type="text" name="myfield" id="myfield" /&amp;gt;&lt;br /&gt;&amp;lt;input type="button" name="btn" id="btn" value="Submit" /&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;div id="msg"&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;This file it's called index.html&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And then the file ajax.php, will take the parameters sent through ajax, and echo the response:&lt;br /&gt;&lt;br /&gt;$myfield = $_POST['myfield'];&lt;br /&gt;echo $myfield;&lt;br /&gt;&lt;br /&gt;This line returns the value in #msg div.&lt;br /&gt;&lt;br /&gt;So there you go, ajax with jquery is pretty simple, you can see here how to send parameters through ajax, and how to get the response into a div. This code can be used to validate user input, emails, number, etc. Instead of $myfield you can echo an error message, or a success message, your choice.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-5696961270068360009?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/5696961270068360009/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=5696961270068360009' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/5696961270068360009'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/5696961270068360009'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2009/04/jquery-ajax-post-form.html' title='Jquery ajax post form'/><author><name>blogadmin</name><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-1294271072281166640.post-244270558193634368</id><published>2009-04-09T11:20:00.004+03:00</published><updated>2009-04-09T11:27:28.184+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tutorials'/><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Looking for a PHP or MySQL article?</title><content type='html'>If you are looking for an article that is not on this site, or looking for a solution regarding PHP or MySQL problem, please comment this post and I'll do my best to give you solutions to your problems as soon as possible.&lt;br /&gt;&lt;br /&gt;I am writing these PHP articles and tutorials to help you become a better web developer. All my articles are short and with code examples.&lt;br /&gt;&lt;br /&gt;So if you have a "How to...?" question and you need my help (for free :) ) please post it in comments area.&lt;br /&gt;&lt;br /&gt;Also if you need a professional web developer, I am available for freelance, providing quality code, security, database optimization, fast websites&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-244270558193634368?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/244270558193634368/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=244270558193634368' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/244270558193634368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/244270558193634368'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2009/04/looking-for-php-or-mysql-article.html' title='Looking for a PHP or MySQL article?'/><author><name>blogadmin</name><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-1294271072281166640.post-4036171336671562536</id><published>2009-04-07T16:56:00.003+03:00</published><updated>2009-04-07T16:59:27.681+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>PHP strip everything but numbers</title><content type='html'>Stripping non digits in PHP is easy and smooth.&lt;br /&gt;&lt;br /&gt;Here is the code:&lt;br /&gt;&lt;br /&gt;$digits = eregi_replace('[^[:digit:]]', '', $string );&lt;br /&gt;&lt;br /&gt;So having a $string = 'ab345dc-.';&lt;br /&gt;&lt;br /&gt;The result would be: $digits = 345;&lt;br /&gt;&lt;br /&gt;Using eregi_replace all the non digits charactes will be removed. Filter out everything but numbers using this code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-4036171336671562536?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/4036171336671562536/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=4036171336671562536' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/4036171336671562536'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/4036171336671562536'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2009/04/php-strip-everything-but-numbers.html' title='PHP strip everything but numbers'/><author><name>blogadmin</name><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-1294271072281166640.post-7529577980079599074</id><published>2009-04-07T16:20:00.004+03:00</published><updated>2009-04-07T16:25:50.902+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>PHP format days, month in your language</title><content type='html'>How do you display day and month from a date in your language (other than English)&lt;br /&gt;&lt;br /&gt;Eg: 14/03/2009 in English would be: Saturday 14 March 2009. So how do you get "Saturday" and "March" in your language. Easy. Using setlocale function.&lt;br /&gt;&lt;br /&gt;Here is a simple example, displaying day and month in Romanian language:&lt;br /&gt;&lt;br /&gt;setlocale(LC_ALL, 'ro-RO');&lt;br /&gt;echo iconv('ISO-8859-1', 'UTF-8',strftime("%A, %d %B %Y",strtotime('2009/03/14')));&lt;br /&gt;&lt;br /&gt;so strftime is using setlocale to display date and time. inconv function is converting all the weird characters from to UTF-8 so they are displayed properly.&lt;br /&gt;&lt;br /&gt;So now you can easily display dates (days and months) in your native language if is other than English, just setlocale to your language and display through strftime.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-7529577980079599074?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/7529577980079599074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=7529577980079599074' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/7529577980079599074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/7529577980079599074'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2009/04/php-format-days-month-in-your-language.html' title='PHP format days, month in your language'/><author><name>blogadmin</name><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-1294271072281166640.post-4663041716804977823</id><published>2009-04-01T18:21:00.002+03:00</published><updated>2009-04-01T18:23:48.087+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>How to parse a PHP file and get contents</title><content type='html'>file_get_contents function only gets a file contents, but it does not parse it. So if you are interested in parsing a file, and the get its contents, here is the way:&lt;br /&gt;&lt;br /&gt;ob_start();&lt;br /&gt;include($filename);&lt;br /&gt;$return_str = ob_get_contents();&lt;br /&gt;ob_end_clean();&lt;br /&gt;&lt;br /&gt;So using output buffering, we will include the file, and then get the output result in a variable.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-4663041716804977823?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/4663041716804977823/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=4663041716804977823' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/4663041716804977823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/4663041716804977823'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2009/04/how-to-parse-php-file-and-get-contents.html' title='How to parse a PHP file and get contents'/><author><name>blogadmin</name><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-1294271072281166640.post-4100177492850090825</id><published>2009-03-25T14:36:00.002+02:00</published><updated>2009-03-25T14:37:49.933+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>PHP get number of lines in a text file</title><content type='html'>Counting number of lines in a text file is easy.&lt;br /&gt;&lt;br /&gt;Here is the code:&lt;br /&gt;&lt;br /&gt;$file = "file.txt";&lt;br /&gt;$nr_lines = count(file($file));&lt;br /&gt;&lt;br /&gt;Now you know how to count the number of lines in a text file with PHP.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-4100177492850090825?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/4100177492850090825/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=4100177492850090825' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/4100177492850090825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/4100177492850090825'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2009/03/php-get-number-of-lines-in-text-file.html' title='PHP get number of lines in a text file'/><author><name>blogadmin</name><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-1294271072281166640.post-329710290692143736</id><published>2009-03-23T18:25:00.002+02:00</published><updated>2009-03-23T18:30:54.592+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><title type='text'>Synchronize MySQL structure</title><content type='html'>Here is the scenario:&lt;br /&gt;&lt;br /&gt;You have a localhost database, that is your development database.&lt;br /&gt;And you have a production database, somewhere on a server.&lt;br /&gt;&lt;br /&gt;After you've done some updates on your localhost development mysql database, you want to synchronize with the production database.&lt;br /&gt;&lt;br /&gt;You can do that very easy using &lt;a href="http://www.navicat.com/"&gt;Navicat for MySQL&lt;/a&gt;. Tools -&gt; Data Synchonization. You cand download it, it is fully functional for 30 days, after that you'll have to buy it.&lt;br /&gt;&lt;br /&gt;So no more searching for altered tables, new tables, deleted fields, just synchronize your database easy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-329710290692143736?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/329710290692143736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=329710290692143736' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/329710290692143736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/329710290692143736'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2009/03/synchronize-mysql-structure.html' title='Synchronize MySQL structure'/><author><name>blogadmin</name><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-1294271072281166640.post-7886664891913127366</id><published>2009-03-20T17:47:00.002+02:00</published><updated>2009-03-20T18:05:10.005+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><title type='text'>First letter uppercase in MySQL</title><content type='html'>So you have all types of string in a mysql database. &lt;br /&gt;&lt;br /&gt;Eg:&lt;br /&gt;&lt;br /&gt;MySQL&lt;br /&gt;MYSQL&lt;br /&gt;mysql&lt;br /&gt;MySqL&lt;br /&gt;&lt;br /&gt;And you want to make the first letter of each record uppercase and the rest lowercase.&lt;br /&gt;Here is the update syntax for this job:&lt;br /&gt;&lt;br /&gt;UPDATE mytable SET myfield=CONCAT(UPPER(SUBSTRING(myfield, 1, 1)), LOWER(SUBSTRING(myfield FROM 2)))&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-7886664891913127366?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/7886664891913127366/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=7886664891913127366' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/7886664891913127366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/7886664891913127366'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2009/03/first-letter-uppercase-in-mysql.html' title='First letter uppercase in MySQL'/><author><name>blogadmin</name><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>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1294271072281166640.post-2668432351909824373</id><published>2009-03-12T12:20:00.002+02:00</published><updated>2009-03-12T12:23:47.032+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><title type='text'>MySQL implode like function</title><content type='html'>If you need an implode like function in MySQL, there is a solution: &lt;a href="http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html#function_group-concat"&gt;GROUP_CONCAT&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;GROUP_CONCAT concatenates a string by comma (,).&lt;br /&gt;&lt;br /&gt;So if you had a table tags (id, tag)&lt;br /&gt;&lt;br /&gt;1 test&lt;br /&gt;2 test2&lt;br /&gt;3 test3&lt;br /&gt;&lt;br /&gt;SELECT GROUP_CONCAT(tag) FROM tags&lt;br /&gt;&lt;br /&gt;The result would be: test,test2,test3&lt;br /&gt;&lt;br /&gt;Pretty cool, huh?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-2668432351909824373?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/2668432351909824373/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=2668432351909824373' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/2668432351909824373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/2668432351909824373'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2009/03/mysql-implode-like-function.html' title='MySQL implode like function'/><author><name>blogadmin</name><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-1294271072281166640.post-9210990665786004613</id><published>2009-03-06T15:42:00.003+02:00</published><updated>2009-03-06T15:46:53.333+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>Javascript back button</title><content type='html'>Create a link or a button to go to the previous page, using this code:&lt;br /&gt;&lt;blockquote&gt;&amp;lt;a href="javascript:history.go(-1)"&amp;gt;Back&amp;lt;/a&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This way, the visitor can go back to the previous page without pressing the "Back" button of his browser.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-9210990665786004613?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/9210990665786004613/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=9210990665786004613' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/9210990665786004613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/9210990665786004613'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2009/03/javascript-back-button.html' title='Javascript back button'/><author><name>blogadmin</name><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-1294271072281166640.post-4360940522527739540</id><published>2007-12-07T17:52:00.000+02:00</published><updated>2007-12-07T17:57:23.715+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>PHP force file download</title><content type='html'>&lt;h1&gt;How to force file download in PHP&lt;/h1&gt;&lt;br /&gt;&lt;br /&gt;Here is how you can force a client to download a file.&lt;br /&gt;&lt;br /&gt;$text = 'force me to download';&lt;br /&gt;&lt;br /&gt;&lt;code style="white-space: nowrap;"&gt;&lt;code&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/code&gt;header("Content-Length: " . strlen($text) );&lt;br /&gt;header('Content-Type: text/plain');&lt;br /&gt;header('Content-Disposition: attachment; filename=downloadme.txt');&lt;br /&gt;&lt;br /&gt;This will force browser to download/save the file named 'downloadme.txt'&lt;br /&gt;&lt;br /&gt;You you want to download other types of files here is a small list of types of files that you can use in Content-Type field:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;"pdf": "application/pdf"&lt;/li&gt;&lt;li&gt;"exe": "application/octet-stream"&lt;/li&gt;&lt;li&gt;"zip": "application/zip"&lt;/li&gt;&lt;li&gt;"xls": "application/vnd.ms-excel"&lt;/li&gt;&lt;li&gt;"ppt": "application/vnd.ms-powerpoint"&lt;/li&gt;&lt;li&gt;"gif": "image/gif"&lt;/li&gt;&lt;li&gt;"png": "image/png"&lt;/li&gt;&lt;li&gt;"jpg": "image/jpg"&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;code style="white-space: nowrap;"&gt;&lt;code&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-4360940522527739540?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/4360940522527739540/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=4360940522527739540' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/4360940522527739540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/4360940522527739540'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2007/12/php-force-file-download.html' title='PHP force file download'/><author><name>blogadmin</name><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-1294271072281166640.post-510402515567818005</id><published>2007-11-29T11:47:00.000+02:00</published><updated>2007-11-29T12:16:49.736+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><title type='text'>MySQL order by rand() optimization</title><content type='html'>&lt;h1&gt;Optimize Order by RAND() in MySQL&lt;/h1&gt;&lt;br /&gt;&lt;br /&gt;Where when are dealing with large databases, and you want to query you database using &lt;span style="font-weight: bold;"&gt;ORDER BY RAND()&lt;/span&gt;, you will your query is very slow. This article shows you how to speed up this kind of queries.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://akinas.com/pages/en/blog/mysql_random_row/"&gt;http://akinas.com/pages/en/blog/mysql_random_row/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Your optimized ORDER BY RAND() queries will be hundreds time faster now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-510402515567818005?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/510402515567818005/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=510402515567818005' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/510402515567818005'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/510402515567818005'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2007/11/mysql-order-by-rand-optimization.html' title='MySQL order by rand() optimization'/><author><name>blogadmin</name><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-1294271072281166640.post-6891667852231526151</id><published>2007-11-28T17:40:00.000+02:00</published><updated>2007-11-28T17:44:31.476+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><title type='text'>MySQL Data Types</title><content type='html'>&lt;h1&gt;MySQL Data Types&lt;/h1&gt;&lt;br /&gt;&lt;br /&gt;I found a great link, where &lt;span style="font-weight: bold;"&gt;MYSQL Data Types&lt;/span&gt; are detailed.  If you need to know just how much space each data type takes, you should read this great article about mysql data types. It will help you to create the best structure (optimized structure) for your database. The database structure and optimization is important when you deal with large amount of data(millions of records for example).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is the link &lt;a href="http://www.peachpit.com/articles/article.aspx?p=30885&amp;amp;seqNum=7"&gt;http://www.peachpit.com/articles/article.aspx?p=30885&amp;amp;seqNum=7&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-6891667852231526151?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/6891667852231526151/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=6891667852231526151' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/6891667852231526151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/6891667852231526151'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2007/11/mysql-data-types.html' title='MySQL Data Types'/><author><name>blogadmin</name><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-1294271072281166640.post-1154273655192784871</id><published>2007-11-16T12:36:00.000+02:00</published><updated>2007-11-16T12:43:49.801+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='php smarty'/><category scheme='http://www.blogger.com/atom/ns#' term='smarty'/><title type='text'>Smarty format date</title><content type='html'>&lt;h1&gt;How to format date in Smarty&lt;/h1&gt;&lt;br /&gt;&lt;br /&gt;When you extract a date field from database, it is in the format yyyy-mm-dd. But maybe you want to list it other format, for example dd-mm-yyyy. You can retrieve this format directly from database, usign MySQL function DATE_FORMAT, or if you are using Smarty you can use &lt;span style="font-weight: bold;"&gt;date_format&lt;/span&gt; function.&lt;br /&gt;&lt;br /&gt;Here is an example of Smarty date formatting:&lt;br /&gt;&lt;br /&gt;&lt;pre class="programlisting"&gt;{$smarty.now|date_format:"%d:%m:%Y"}&lt;br /&gt;&lt;br /&gt;This will format current time, in dd-mm-yyyy format.&lt;br /&gt;You can find all date conversions on smarty website.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Formatting dates using Smarty&lt;/h2&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-1154273655192784871?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/1154273655192784871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=1154273655192784871' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/1154273655192784871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/1154273655192784871'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2007/11/smarty-format-date.html' title='Smarty format date'/><author><name>blogadmin</name><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>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1294271072281166640.post-8078746926142637276</id><published>2007-11-13T10:34:00.000+02:00</published><updated>2007-11-13T10:40:42.292+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><category scheme='http://www.blogger.com/atom/ns#' term='htaccess'/><title type='text'>Disabling magic quotes in PHP</title><content type='html'>&lt;h1&gt;How to disable magic quotes&lt;/h1&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You cannot &lt;span style="font-weight: bold;"&gt;disable magic quotes&lt;/span&gt; from .htaccess or php.ini, only from apache httpd.conf file.&lt;br /&gt;&lt;br /&gt;You can use PHP to &lt;span style="font-weight: bold;"&gt;disable magic quotes at runtime&lt;/span&gt;. Here is the function:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;span class="html"&gt;&lt;span class="keyword"&gt;if (&lt;/span&gt;&lt;span class="default"&gt;get_magic_quotes_gpc&lt;/span&gt;&lt;span class="keyword"&gt;()) {&lt;br /&gt;   function &lt;/span&gt;&lt;span class="default"&gt;stripslashes_deep&lt;/span&gt;&lt;span class="keyword"&gt;(&lt;/span&gt;&lt;span class="default"&gt;$value&lt;/span&gt;&lt;span class="keyword"&gt;)&lt;br /&gt;   {&lt;br /&gt;       &lt;/span&gt;&lt;span class="default"&gt;$value &lt;/span&gt;&lt;span class="keyword"&gt;= &lt;/span&gt;&lt;span class="default"&gt;is_array&lt;/span&gt;&lt;span class="keyword"&gt;(&lt;/span&gt;&lt;span class="default"&gt;$value&lt;/span&gt;&lt;span class="keyword"&gt;) ?&lt;br /&gt;                   &lt;/span&gt;&lt;span class="default"&gt;array_map&lt;/span&gt;&lt;span class="keyword"&gt;(&lt;/span&gt;&lt;span class="string"&gt;'stripslashes_deep'&lt;/span&gt;&lt;span class="keyword"&gt;, &lt;/span&gt;&lt;span class="default"&gt;$value&lt;/span&gt;&lt;span class="keyword"&gt;) :&lt;br /&gt;                   &lt;/span&gt;&lt;span class="default"&gt;stripslashes&lt;/span&gt;&lt;span class="keyword"&gt;(&lt;/span&gt;&lt;span class="default"&gt;$value&lt;/span&gt;&lt;span class="keyword"&gt;);&lt;br /&gt;&lt;br /&gt;       return &lt;/span&gt;&lt;span class="default"&gt;$value&lt;/span&gt;&lt;span class="keyword"&gt;;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   &lt;/span&gt;&lt;span class="default"&gt;$_POST &lt;/span&gt;&lt;span class="keyword"&gt;= &lt;/span&gt;&lt;span class="default"&gt;array_map&lt;/span&gt;&lt;span class="keyword"&gt;(&lt;/span&gt;&lt;span class="string"&gt;'stripslashes_deep'&lt;/span&gt;&lt;span class="keyword"&gt;, &lt;/span&gt;&lt;span class="default"&gt;$_POST&lt;/span&gt;&lt;span class="keyword"&gt;);&lt;br /&gt;   &lt;/span&gt;&lt;span class="default"&gt;$_GET &lt;/span&gt;&lt;span class="keyword"&gt;= &lt;/span&gt;&lt;span class="default"&gt;array_map&lt;/span&gt;&lt;span class="keyword"&gt;(&lt;/span&gt;&lt;span class="string"&gt;'stripslashes_deep'&lt;/span&gt;&lt;span class="keyword"&gt;, &lt;/span&gt;&lt;span class="default"&gt;$_GET&lt;/span&gt;&lt;span class="keyword"&gt;);&lt;br /&gt;   &lt;/span&gt;&lt;span class="default"&gt;$_COOKIE &lt;/span&gt;&lt;span class="keyword"&gt;= &lt;/span&gt;&lt;span class="default"&gt;array_map&lt;/span&gt;&lt;span class="keyword"&gt;(&lt;/span&gt;&lt;span class="string"&gt;'stripslashes_deep'&lt;/span&gt;&lt;span class="keyword"&gt;, &lt;/span&gt;&lt;span class="default"&gt;$_COOKIE&lt;/span&gt;&lt;span class="keyword"&gt;);&lt;br /&gt;   &lt;/span&gt;&lt;span class="default"&gt;$_REQUEST &lt;/span&gt;&lt;span class="keyword"&gt;= &lt;/span&gt;&lt;span class="default"&gt;array_map&lt;/span&gt;&lt;span class="keyword"&gt;(&lt;/span&gt;&lt;span class="string"&gt;'stripslashes_deep'&lt;/span&gt;&lt;span class="keyword"&gt;, &lt;/span&gt;&lt;span class="default"&gt;$_REQUEST&lt;/span&gt;&lt;span class="keyword"&gt;);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;This function will strip slashes for all REQUEST values. If you make SQL queries with these values, you have to use mysql_real_escape_string function in order to prevent sql injection.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Disabling magic quotes, using Apache and PHP&lt;/h2&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-8078746926142637276?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/8078746926142637276/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=8078746926142637276' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/8078746926142637276'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/8078746926142637276'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2007/11/disabling-magic-quotes-in-php.html' title='Disabling magic quotes in PHP'/><author><name>blogadmin</name><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>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1294271072281166640.post-8071801401709849705</id><published>2007-11-12T13:12:00.001+02:00</published><updated>2007-11-12T13:14:54.534+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>Change text link in Javascript</title><content type='html'>&lt;h1&gt;How to change a link text in Javascript&lt;/h1&gt;&lt;br /&gt;&lt;br /&gt;Let's say you have a link, with the anchor text 'mylink', and you want to change this text using Javascript. For this we will use innerHTML attribute. Here it is:&lt;br /&gt;&lt;br /&gt;document.getElementByID( 'mylinkid' ).innerHTML = 'my new link text';&lt;br /&gt;&lt;br /&gt;You will probably need this if youn need to show/hide some html elements.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Changing text in a link using Javascript&lt;/h2&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-8071801401709849705?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/8071801401709849705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=8071801401709849705' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/8071801401709849705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/8071801401709849705'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2007/11/change-text-link-in-javascript.html' title='Change text link in Javascript'/><author><name>blogadmin</name><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-1294271072281166640.post-5939312446764712111</id><published>2007-11-10T10:31:00.000+02:00</published><updated>2007-11-10T10:41:25.150+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>Javascript explode function</title><content type='html'>&lt;h1&gt;Javascript function like PHP explode function&lt;br /&gt;&lt;/h1&gt;&lt;br /&gt;&lt;br /&gt;Looking for an explode function in Javascript? JS has such a function, called &lt;span style="font-weight: bold;"&gt;split&lt;/span&gt;. Split take a string, and splits it by a separator, then return an array containing the result. So it works just like explode PHP function.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;var mystring = 'test explode split string';&lt;br /&gt;var myarray = mystring.split(" ");&lt;br /&gt;&lt;br /&gt;Split array would have 4 elements: test, explode, split, string.&lt;br /&gt;&lt;br /&gt;So&lt;span style="font-weight: bold;"&gt; javascript split function&lt;/span&gt; is the equivalent of explode function in PHP.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-5939312446764712111?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/5939312446764712111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=5939312446764712111' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/5939312446764712111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/5939312446764712111'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2007/11/javascript-explode-function.html' title='Javascript explode function'/><author><name>blogadmin</name><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-1294271072281166640.post-592836002260592668</id><published>2007-11-08T10:43:00.000+02:00</published><updated>2007-11-08T10:56:34.676+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php classes'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Form Validation with PHP</title><content type='html'>&lt;h1&gt;Validating forms in PHP&lt;/h1&gt;&lt;br /&gt;Using validation class from PEAR &lt;a href="http://pear.php.net/package/Validate"&gt;http://pear.php.net/package/Validate&lt;/a&gt;, it's very easy to validate forms. Forms validation is neede in order to protect your website from xss injection, sql injection, email injection. For example if you are expecting an email address in a field, you should validate that field for an email address.&lt;br /&gt;&lt;br /&gt;This class validation from PEAR has the following validation methods:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;number&lt;/li&gt;&lt;li&gt;email&lt;/li&gt;&lt;li&gt;date&lt;/li&gt;&lt;li&gt;string&lt;/li&gt;&lt;li&gt;and more&lt;/li&gt;&lt;/ul&gt;All you have to do is download this validation class from PEAR, and you now can have a safe website by validationg user input. Open downloaded class, and you will see all the methods, with all the parameters required for each validation method.&lt;br /&gt;&lt;h2&gt;How to validate form submission in PHP&lt;/h2&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-592836002260592668?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/592836002260592668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=592836002260592668' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/592836002260592668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/592836002260592668'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2007/11/form-validation-with-php.html' title='Form Validation with PHP'/><author><name>blogadmin</name><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-1294271072281166640.post-3726607915335840861</id><published>2007-11-06T16:01:00.000+02:00</published><updated>2007-11-06T16:08:50.608+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>How to check if a text exists in a string</title><content type='html'>&lt;h1&gt;How to check if a substring exists in a string in PHP&lt;/h1&gt;&lt;br /&gt;&lt;br /&gt;Having a string:&lt;br /&gt;&lt;br /&gt;$mystring = 'teststringforme';&lt;br /&gt;&lt;br /&gt;I want to know if, for example, '&lt;span style="font-weight: bold;"&gt;for&lt;/span&gt;' exists in $mystring. Using PHP function &lt;span style="font-weight: bold;"&gt;strpos&lt;/span&gt;, it's very easy.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;if( strpos( $mystring, 'for' ) !== false )&lt;br /&gt;{&lt;br /&gt;   echo 'string exists';&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;   echo 'string does not exist';&lt;br /&gt;}&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Find if a text exists in a string using PHP&lt;/h2&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-3726607915335840861?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/3726607915335840861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=3726607915335840861' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/3726607915335840861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/3726607915335840861'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2007/11/how-to-check-if-text-exists-in-string.html' title='How to check if a text exists in a string'/><author><name>blogadmin</name><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-1294271072281166640.post-2681506622644384738</id><published>2007-11-05T11:46:00.000+02:00</published><updated>2007-11-05T11:51:02.666+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><title type='text'>Replace string in MySQL</title><content type='html'>&lt;h1&gt;Replacing a string in MySQL&lt;/h1&gt;&lt;br /&gt;&lt;br /&gt;So you have hundreds of records in a table, and you want to &lt;span style="font-weight: bold;"&gt;replace a string&lt;/span&gt; in a single query.&lt;br /&gt;You could use the &lt;span style="font-weight: bold;"&gt;REPLACE&lt;/span&gt; MySQL function. Here is your replace query:&lt;br /&gt;&lt;br /&gt;UPDATE yourtable SET yourfield = REPLACE(yourfield,"some_string","some_new_string")&lt;br /&gt;WHERE yourconditions.&lt;br /&gt;&lt;br /&gt;This query replaces "some_string" with "some_new_string" in "yourfield" field. You can also add some conditions in WHERE statement.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;How to replace a string in mySQL&lt;/h2&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-2681506622644384738?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/2681506622644384738/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=2681506622644384738' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/2681506622644384738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/2681506622644384738'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2007/11/replace-string-in-mysql.html' title='Replace string in MySQL'/><author><name>blogadmin</name><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-1294271072281166640.post-9107313511132818029</id><published>2007-11-02T22:19:00.001+02:00</published><updated>2007-11-02T22:26:48.964+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>How to parse CSV files in PHP</title><content type='html'>&lt;h1&gt;Parsing CSV files in PHP&lt;/h1&gt;&lt;br /&gt;&lt;br /&gt;CSV - comma separated values. Values in a CSV file are separated by comma.&lt;br /&gt;&lt;br /&gt;Eg:&lt;br /&gt;&lt;br /&gt;name, score&lt;br /&gt;john, 10&lt;br /&gt;brian, 5&lt;br /&gt;jane, 8&lt;br /&gt;&lt;br /&gt;So how do you get values from a CSV file in PHP? The easiest way to is to use PHP function &lt;a href="http://www.php.net/fgetcsv"&gt;fgetcsv&lt;/a&gt; . Read the documentation about this function, and there is also an easy example there.&lt;br /&gt;&lt;br /&gt;Using CSV files, is a good option if you don't have access or you don't want to use a database. After you parse the CSV file, you can get the values in an array, and then display them any way you want on the web page.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;  PHP parse csv file&lt;/h2&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-9107313511132818029?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/9107313511132818029/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=9107313511132818029' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/9107313511132818029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/9107313511132818029'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2007/11/how-to-parse-csv-files-in-php.html' title='How to parse CSV files in PHP'/><author><name>blogadmin</name><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-1294271072281166640.post-3015034677117631106</id><published>2007-11-01T19:02:00.001+02:00</published><updated>2007-11-01T19:06:28.684+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Sending mail with PHP</title><content type='html'>&lt;h1&gt;How to send mail using PHP&lt;/h1&gt;&lt;br /&gt;&lt;br /&gt;Using phpmailer class, you can send email with PHP very easy. You can download phpmailer from &lt;a href="http://phpmailer.sourceforge.net/"&gt;here&lt;/a&gt;. PHP has many options, mail can be sent using SMTP or php mail function. You can also add attachments, add BCCs, CCs and send HTML email. I've been using this class for a while, and I am very happy with it. Some examples can be found &lt;a href="http://phpmailer.sourceforge.net/extending.html"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Send mail in PHP tutorial&lt;/h2&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-3015034677117631106?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/3015034677117631106/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=3015034677117631106' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/3015034677117631106'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/3015034677117631106'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2007/11/sending-mail-with-php.html' title='Sending mail with PHP'/><author><name>blogadmin</name><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-1294271072281166640.post-3014656895638667727</id><published>2007-11-01T18:46:00.000+02:00</published><updated>2007-11-01T19:15:16.805+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>How to alternate row colors with php</title><content type='html'>&lt;h1&gt;Alternate colors in table rows with php&lt;/h1&gt;&lt;br /&gt;&lt;br /&gt;Alternating colors in php, it's simple. Here is the code:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;br /&gt;foreach( $array_values as $value )&lt;br /&gt;{&lt;br /&gt; $counter++;&lt;br /&gt; $background_color = ( $counter % 2 == 0 ) ? ('blue') : ('red');&lt;br /&gt;&lt;br /&gt; echo '&amp;lt;tr&amp;gt;&amp;lt;td style="background-color:'.$background_color.'"&amp;gt;' . $value . '&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&lt;br /&gt;}&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;As you can see it's simple. If the current row number is even the color is blue, if the row number is odd, background color is red. This is just an example, you can alternate what colors you want using php. $array_values array can be an array coming from a database query.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-3014656895638667727?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/3014656895638667727/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=3014656895638667727' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/3014656895638667727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/3014656895638667727'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2007/11/how-to-alternate-row-colors-with-php.html' title='How to alternate row colors with php'/><author><name>blogadmin</name><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-1294271072281166640.post-6623822767204408189</id><published>2007-10-28T13:56:00.000+02:00</published><updated>2007-10-28T14:22:29.533+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Store images on disk or database?</title><content type='html'>&lt;h1&gt;Should you store uploaded images on disk or database?&lt;/h1&gt;&lt;br /&gt;&lt;br /&gt;I store my uploaded images on disk, and not in database. Why? One thing is that most hosting providers limit the mysql database. So if you have a large number of images, the database won't be enough for you. In database I keep the path and the filename, and the file is kept on the disk.&lt;br /&gt;Also, having the images stored on the disk, you can access them very easy with ftp clients for example. Showing the image in the browser, does not affect database server's performance, having the image stored on the disk.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-6623822767204408189?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/6623822767204408189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=6623822767204408189' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/6623822767204408189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/6623822767204408189'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2007/10/store-images-on-disk-or-database.html' title='Store images on disk or database?'/><author><name>blogadmin</name><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-1294271072281166640.post-5382163693385380878</id><published>2007-10-18T17:26:00.000+03:00</published><updated>2007-10-18T17:38:30.430+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>Get number of characters in Javascript</title><content type='html'>&lt;h2&gt;How to count number of characters in a string in Javascript&lt;/h2&gt;&lt;span style="font-weight: bold;"&gt;length&lt;/span&gt; javascript's function returns the length (number of characters) of a given string.&lt;br /&gt;&lt;br /&gt;For example:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;br /&gt;var mystring = 'test string';&lt;br /&gt;&lt;br /&gt;alert( mystring.length ) ;&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;This will alert a window with the number of characters of &lt;span style="font-style: italic;"&gt;mystring&lt;/span&gt; variable.&lt;br /&gt;&lt;br /&gt;If you want to get number of characters in a textfield using javascript, that you need to call the same function, &lt;span style="font-weight:bold;"&gt;length&lt;/span&gt; this way:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;alert( document.yourform.yourfieldname.value.length );&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-5382163693385380878?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/5382163693385380878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=5382163693385380878' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/5382163693385380878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/5382163693385380878'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2007/10/get-number-of-characters-in-javascript.html' title='Get number of characters in Javascript'/><author><name>blogadmin</name><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-1294271072281166640.post-4333622461055655437</id><published>2007-10-16T21:01:00.000+03:00</published><updated>2007-10-16T21:07:48.702+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>PHP MySQL Calendar Class</title><content type='html'>&lt;h2&gt;PHP MySQL Calendar Class&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;PEAR has this great &lt;a href="http://pear.php.net/package/Calendar"&gt;calendar class&lt;/a&gt; . There is no need for you to waste your time by building a calendar class, this is a great one. Documentation for this class can be found &lt;a href="http://pear.php.net/manual/en/package.datetime.calendar.php"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Some working examples of this calendar class written in php and mysql can be found &lt;a href="http://pearcalendar.sourceforge.net/examples/"&gt;here&lt;/a&gt;. As you can see it is really easy to work with this class, and it is well documented. You can easily extend it and use it for your own needs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-4333622461055655437?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/4333622461055655437/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=4333622461055655437' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/4333622461055655437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/4333622461055655437'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2007/10/php-mysql-calendar-class.html' title='PHP MySQL Calendar Class'/><author><name>blogadmin</name><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-1294271072281166640.post-2648786785226477122</id><published>2007-10-16T16:11:00.000+03:00</published><updated>2007-10-16T16:15:28.533+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>Javascript open centered popup window</title><content type='html'>&lt;h2&gt;How to open a centered pop-up window in Javascript&lt;/h2&gt;&lt;br /&gt;Here is a Javascript function that allows you to open a centered window, no matter what resolution the visitor uses.&lt;br /&gt;&lt;br /&gt;function OpenCenteredWindow( url, width, height )&lt;br /&gt;{&lt;br /&gt;      var left = Math.floor( (screen.width - width) / 2);&lt;br /&gt;    var top = Math.floor( (screen.height - height) / 2);&lt;br /&gt;    var winParms = "top=" + top + ",left=" + left + ",height=" + height + ",width=" + width;&lt;br /&gt;    winParms += ",toolbar=no,status=no,scrollbars=yes,menubar=no,resizable=no,location=no,directories=no";&lt;br /&gt;    var win = window.open(url, '', winParms);&lt;br /&gt;    if (parseInt(navigator.appVersion) &gt;= 4) { win.window.focus(); }&lt;br /&gt;    return win;  &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;There are three parameters:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;url - the address you want to open in the new window&lt;/li&gt;&lt;li&gt;width - the width of the new popup window&lt;/li&gt;&lt;li&gt;height - the height of the new centered window&lt;/li&gt;&lt;/ul&gt;Also you can set what parameters the new window will have: toolbar, status, scrollbars, menubar, resizable, location, directories.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-2648786785226477122?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/2648786785226477122/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=2648786785226477122' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/2648786785226477122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/2648786785226477122'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2007/10/javascript-open-centered-popup-window.html' title='Javascript open centered popup window'/><author><name>blogadmin</name><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-1294271072281166640.post-4703965959859314069</id><published>2007-10-16T13:42:00.000+03:00</published><updated>2007-10-16T16:11:13.051+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><category scheme='http://www.blogger.com/atom/ns#' term='htaccess'/><category scheme='http://www.blogger.com/atom/ns#' term='upload'/><title type='text'>Change upload file size apache</title><content type='html'>&lt;h2&gt;How to change the PHP maximum upload file size&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;The default maximum upload size for files is 2MB. If you have access to .htaccess files, you can change the maximum upload size from there. Here is what you should write in .htaccess files for apache:&lt;br /&gt;&lt;br /&gt;php_value max_execution_time 1200&lt;br /&gt;php_value memory_limit 30M&lt;br /&gt;php_value post_max_size 10M&lt;br /&gt;php_value upload_max_filesize 10M&lt;br /&gt;&lt;br /&gt;In the first line you increase maximum execution time from 30 seconds (default) to 1200 seconds. This way if the file is large, you won't get a timeout browser error.&lt;br /&gt;In the second line you increase memory limit to 30MB.&lt;br /&gt;The third line increases post maximum size to 10MB.&lt;br /&gt;And the last line increases upload maximum filesize to 10MB.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-4703965959859314069?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/4703965959859314069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=4703965959859314069' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/4703965959859314069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/4703965959859314069'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2007/10/change-upload-file-size-apache.html' title='Change upload file size apache'/><author><name>blogadmin</name><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-1294271072281166640.post-1460190624861182442</id><published>2007-10-12T16:25:00.000+03:00</published><updated>2007-10-12T16:30:33.792+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php classes'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='upload'/><title type='text'>Upload and image manipulation class</title><content type='html'>So you want to upload your files, but also validate extensions, size. You can use PEAR's &lt;a href="http://pear.php.net/package/HTTP_Upload"&gt;HTTP_Upload&lt;/a&gt; class for that.&lt;br /&gt;&lt;br /&gt;And then if you want to only upload images, and create thumbnails, resize images or crop the uploaded images, you can use the above upload class and this great &lt;a href="http://www.gen-x-design.com/projects/php-thumbnailer-class/"&gt;Thumbnailer Class&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This two classes make a powerful tool for uploading ,validating, resizing, cropping, rotating images or pictures.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-1460190624861182442?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/1460190624861182442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=1460190624861182442' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/1460190624861182442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/1460190624861182442'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2007/10/upload-and-image-manipulation-class.html' title='Upload and image manipulation class'/><author><name>blogadmin</name><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-1294271072281166640.post-2962757498648918970</id><published>2007-10-12T11:17:00.000+03:00</published><updated>2007-10-16T21:09:59.748+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='pear'/><title type='text'>PEAR MDB2 get array rows</title><content type='html'>This tip is for those who use &lt;a href="http://pear.php.net/package/MDB2"&gt;PEAR MDB2&lt;/a&gt; as your database abstraction layer. There are two nice methods, that are not in documentation, queryRow($query) and queryAll($query).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;queryRow&lt;/span&gt;($query) - returns an associative array for one record&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;queryAll&lt;/span&gt;($query) - return an associative array for all found records&lt;br /&gt;&lt;br /&gt;So for those who like to use arrays (like myself) you don't have to use fetchRow() anymore.&lt;br /&gt;&lt;br /&gt;Documentation for this class can be found &lt;a href="http://pear.php.net/package/MDB2/docs"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;digg_url = 'http://digg.com/programming/PEAR_MDB2_get_rows_in_array';&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-2962757498648918970?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/2962757498648918970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=2962757498648918970' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/2962757498648918970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/2962757498648918970'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2007/10/pear-mdb2-get-array-rows.html' title='PEAR MDB2 get array rows'/><author><name>blogadmin</name><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-1294271072281166640.post-8331067685418182364</id><published>2007-10-09T12:44:00.000+03:00</published><updated>2007-10-09T12:48:58.042+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><category scheme='http://www.blogger.com/atom/ns#' term='htaccess'/><category scheme='http://www.blogger.com/atom/ns#' term='mod rewrite'/><title type='text'>Permanent redirect to www domain</title><content type='html'>You have a domain anydomain.com, and you want a permanent redirect (301) to www.anydomain.com. You can do this using a .htaccess file. Here it is:&lt;br /&gt;&lt;br /&gt;RewriteEngine on&lt;br /&gt;RewriteCond %{HTTP_HOST}!^www.anydomain.com&lt;br /&gt;RewriteRule ^(.*)$ http://www.anydomain.com/$1 [R=301,L]&lt;br /&gt;&lt;br /&gt;So if someone types anydomain.com, he will be redirected to www.anydomain.com. easy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-8331067685418182364?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/8331067685418182364/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=8331067685418182364' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/8331067685418182364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/8331067685418182364'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2007/10/permanent-redirect-to-www-domain.html' title='Permanent redirect to www domain'/><author><name>blogadmin</name><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-1294271072281166640.post-696996565759653085</id><published>2007-10-09T00:44:00.001+03:00</published><updated>2007-10-09T00:44:50.241+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>Javascript change element visibility</title><content type='html'>Want to change an element visibility from javascript. Here is an example.&lt;br /&gt;&lt;br /&gt;document.getElementById("your_element_id").style.visibility = "hidden";&lt;br /&gt;document.getElementById("your_element_id").style.visibility = "visible";&lt;br /&gt;&lt;br /&gt;As you can see the visibility for an element can be hidden or visible. Make sure you have set an ID for your element.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-696996565759653085?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/696996565759653085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=696996565759653085' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/696996565759653085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/696996565759653085'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2007/10/javascript-change-element-visibility.html' title='Javascript change element visibility'/><author><name>blogadmin</name><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-1294271072281166640.post-3425692539590124127</id><published>2007-10-08T17:20:00.000+03:00</published><updated>2007-10-09T00:45:20.275+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><title type='text'>MySQL get date from string</title><content type='html'>Let's say you have a string, like '18-Sep-2007' and you want to format it in date format %Y-%m-%d. You can use STR_TO_DATE function. First parameter is your string, and the second parameter is the format of your string, in this case %d-%b-%Y. You can see the format values here: &lt;br /&gt;&lt;a href="http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_date-format"&gt;http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_date-format&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So STR_TO_DATE('18-Sep-2007','%d-%b-%Y') = 2007-09-18&lt;br /&gt;&lt;br /&gt;You can use this result to compare dates, to order dates, or other date operations.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-3425692539590124127?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/3425692539590124127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=3425692539590124127' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/3425692539590124127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/3425692539590124127'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2007/10/mysql-get-date-from-string.html' title='MySQL get date from string'/><author><name>blogadmin</name><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-1294271072281166640.post-4526774004279563071</id><published>2007-10-06T21:10:00.000+03:00</published><updated>2007-10-06T21:28:08.932+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php classes'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>PHP useful classes</title><content type='html'>Here is a list of PHP tools or classes I use to develop my projects.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://pear.php.net/package/MDB2"&gt;MDB2&lt;/a&gt; - Database Abstraction Layer&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://phpsavant.com/yawiki/"&gt;PHP Savant&lt;/a&gt; - Object oriented template system&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://pear.php.net/package/Validate"&gt;Validate&lt;/a&gt; - Validation class&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://pear.php.net/package/HTTP_Upload"&gt;Upload&lt;/a&gt; - Upload class&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://pear.php.net/package/Calendar"&gt;Calendar&lt;/a&gt; - Calendar class&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://pear.php.net/package/Pager"&gt;Pager&lt;/a&gt; - Data paging class&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://pear.php.net/package/Benchmark"&gt;Benchmark&lt;/a&gt; - Benchmark class&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://interface.eyecon.ro/"&gt;Interface Elements&lt;/a&gt; - Interface elements for JQuery&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-4526774004279563071?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/4526774004279563071/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=4526774004279563071' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/4526774004279563071'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/4526774004279563071'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2007/10/php-useful-classes.html' title='PHP useful classes'/><author><name>blogadmin</name><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-1294271072281166640.post-7196604786659916291</id><published>2007-10-06T20:16:00.000+03:00</published><updated>2007-10-06T20:18:03.009+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tutorials'/><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='tips and tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='articles'/><title type='text'>PHP MySQL Blog</title><content type='html'>Hello,&lt;br /&gt;&lt;br /&gt;Here I will post tips and tricks about PHP and MySQL. Everything I will find useful you will find here, so you won't have to search lots of pages on the internet. Also if you have any question please post a message, and I will try to help you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1294271072281166640-7196604786659916291?l=php-mysql-articles.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-articles.blogspot.com/feeds/7196604786659916291/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1294271072281166640&amp;postID=7196604786659916291' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/7196604786659916291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1294271072281166640/posts/default/7196604786659916291'/><link rel='alternate' type='text/html' href='http://php-mysql-articles.blogspot.com/2007/10/php-mysql-blog.html' title='PHP MySQL Blog'/><author><name>blogadmin</name><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>
