<?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:blogger='http://schemas.google.com/blogger/2008' 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-3405249017195979413</id><updated>2024-09-17T10:24:45.071+04:00</updated><category term="PHP"/><category term="mySQL"/><category term="Joomla"/><category term="joomla tutorials"/><category term="jquery"/><category term="ajax"/><category term="ajax programming"/><category term="ajax tutorial"/><category term="ajax web development 2.0"/><category term="css"/><category term="javascript"/><category term="javascript jquery"/><category term="joomla books"/><category term="jquery tutorial"/><category term="jquery tutorials"/><category term="php tutorial"/><title type='text'>I&#39;m a programmer</title><subtitle type='html'>Tips and tricks to make programming for the web easier</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://wprogramming.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3405249017195979413/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://wprogramming.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3405249017195979413.post-1835649601361107831</id><published>2012-06-22T17:15:00.001+04:00</published><updated>2012-06-22T17:15:54.385+04:00</updated><title type='text'>Joomla 2.5</title><content type='html'>&lt;div&gt;&lt;p&gt;Hello everyone. As you may or may not know, the official Joomla 2.5 has been out for a while now and I intend to create some new tutorials regarding it. So stay tuned...&lt;/p&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wprogramming.blogspot.com/feeds/1835649601361107831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wprogramming.blogspot.com/2012/06/joomla-25.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3405249017195979413/posts/default/1835649601361107831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3405249017195979413/posts/default/1835649601361107831'/><link rel='alternate' type='text/html' href='http://wprogramming.blogspot.com/2012/06/joomla-25.html' title='Joomla 2.5'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3405249017195979413.post-4785198387174369739</id><published>2010-11-08T12:40:00.002+04:00</published><updated>2010-11-08T12:43:20.092+04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Joomla"/><title type='text'>Check the group id of a user in Joomla</title><content type='html'>If you are doing your own custom Joomla component, somtimes it is very helpful to determine the user group of a user in order to perform necessary actions (for example, only admins can delete a record).&lt;br /&gt;
&lt;br /&gt;
For doing this, we must get the group id. They are as follows:&lt;br /&gt;
&lt;br /&gt;
Public : &lt;b&gt;0&lt;/b&gt;&lt;br /&gt;
Registered : &lt;b&gt;1&lt;/b&gt;&lt;br /&gt;
Special : &lt;b&gt;2&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Users that have access to the backend fall under the Special group.&lt;br /&gt;
&lt;br /&gt;
The following code will check the group id of the current user and display a message if user is not of &#39;Special&#39; type.&lt;br /&gt;
&lt;blockquote&gt;$user = JFactory::getUser();&lt;br /&gt;
$userGID = $user-&amp;gt;get(&#39;gid&#39;);&lt;br /&gt;
if ($userGID != 2)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; echo &quot;You do not have the necessary permissions to perform this action.&quot;;&lt;br /&gt;
} &lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://wprogramming.blogspot.com/feeds/4785198387174369739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wprogramming.blogspot.com/2010/11/check-user-group-of-user-in-joomla.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3405249017195979413/posts/default/4785198387174369739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3405249017195979413/posts/default/4785198387174369739'/><link rel='alternate' type='text/html' href='http://wprogramming.blogspot.com/2010/11/check-user-group-of-user-in-joomla.html' title='Check the group id of a user in Joomla'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3405249017195979413.post-744000066246361657</id><published>2010-09-30T14:06:00.001+04:00</published><updated>2010-09-30T14:54:30.723+04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mySQL"/><title type='text'>Using &#39;NOT IN&#39; in MySQL</title><content type='html'>&lt;a href=&quot;http://www.amazon.com/MySQL-4th-Paul-DuBois/dp/0672329387?ie=UTF8&amp;amp;tag=webprogramm03-20&amp;amp;link_code=bil&amp;amp;camp=213689&amp;amp;creative=392969&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;MySQL (4th Edition)&quot; src=&quot;http://ws.amazon.com/widgets/q?MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;ID=AsinImage&amp;amp;WS=1&amp;amp;Format=_SL160_&amp;amp;ASIN=0672329387&amp;amp;tag=webprogramm03-20&quot; /&gt;&lt;/a&gt;Suppose we have a table called USERS that has a primary key &#39;id&#39; and another table SUBSCRIPTIONS with foreign key &#39;uid&#39;.&lt;br /&gt;
&lt;br /&gt;
If we want to remove all subscriptions (from the SUBSCRIPTIONS table) that does not correspond to any user, we can run this MySQL query:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;DELETE FROM SUBSCRIPTIONS WHERE uid NOT IN (SELECT id from USERS)&lt;/blockquote&gt;What we are doing here is getting a list of all the ids from the USERS table and then deleting all rows from the SUBSCRIPTIONS table where the user id (uid) does not correspond to any id in the USERS table. Very simple.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Note:&lt;/b&gt; Throughout this blog, you will find many books that are for sale on Amazon. I recommend you get these books while learning web programming as they will help strengthening your skills.</content><link rel='replies' type='application/atom+xml' href='http://wprogramming.blogspot.com/feeds/744000066246361657/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wprogramming.blogspot.com/2010/09/using-not-in-in-mysql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3405249017195979413/posts/default/744000066246361657'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3405249017195979413/posts/default/744000066246361657'/><link rel='alternate' type='text/html' href='http://wprogramming.blogspot.com/2010/09/using-not-in-in-mysql.html' title='Using &#39;NOT IN&#39; in MySQL'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3405249017195979413.post-5879276004147907463</id><published>2010-08-20T12:29:00.006+04:00</published><updated>2010-08-24T16:25:26.519+04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="css"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="jquery"/><title type='text'>How to dynamycally remove an external Javascript or CSS file from a page</title><content type='html'>&lt;iframe align=&quot;left&quot; frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=webprogramm03-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=1590598040&amp;amp;fc1=D4D4D4&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=FCCF55&amp;amp;bc1=363636&amp;amp;bg1=363636&amp;amp;f=ifr&quot; style=&quot;height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;&quot;&gt;&lt;/iframe&gt;The key is to doing this is to traverse the &lt;a href=&quot;http://en.wikipedia.org/wiki/Document_Object_Model&quot; target=&quot;_blank&quot;&gt;DOM&lt;/a&gt; and then call the DOM&#39;s deleteChild() method. &lt;br /&gt;
&lt;br /&gt;
We can identify the file to be deleted by using its filename or CSS class name.  Here I am going to use its filename. &lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;function deletejscssfile(filename, filetype){ &lt;br /&gt;
&lt;br /&gt;
var targetelement=(filetype==&quot;js&quot;)? &quot;script&quot; : (filetype==&quot;css&quot;)? &quot;link&quot; : &quot;none&quot; //determine element type to create nodelist from &lt;br /&gt;
&lt;br /&gt;
var targetattr=(filetype==&quot;js&quot;)? &quot;src&quot; : (filetype==&quot;css&quot;)? &quot;href&quot; : &quot;none&quot; //determine corresponding attribute to test for &lt;br /&gt;
&lt;br /&gt;
var allsuspects=document.getElementsByTagName(targetelement) &lt;br /&gt;
&lt;br /&gt;
for (var i=allsuspects.length; i&amp;gt;=0; i--){ //search backwards within nodelist for matching elements to delete &lt;br /&gt;
&lt;br /&gt;
if (allsuspects[i] &amp;amp;&amp;amp; allsuspects[i].getAttribute(targetattr)!=null &amp;amp;&amp;amp; allsuspects[i].getAttribute(targetattr).indexOf(filename)!=-1) &lt;br /&gt;
&lt;br /&gt;
allsuspects[i].parentNode.deleteChild(allsuspects[i]) //delete element by calling parentNode.deleteChild() &lt;br /&gt;
&lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;
deletejscssfile(&quot;script_to_be_removed.js&quot;, &quot;js&quot;) //delete all occurences of  “script_to_be_removed.js” on page &lt;br /&gt;
&lt;br /&gt;
deletejscssfile(&quot;script_to_be_removed.css&quot;, &quot;css&quot;) //delete all occurences  of “script_to_be_removed.css” on page &lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://wprogramming.blogspot.com/feeds/5879276004147907463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wprogramming.blogspot.com/2010/08/how-to-dynamycally-remove-external.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3405249017195979413/posts/default/5879276004147907463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3405249017195979413/posts/default/5879276004147907463'/><link rel='alternate' type='text/html' href='http://wprogramming.blogspot.com/2010/08/how-to-dynamycally-remove-external.html' title='How to dynamycally remove an external Javascript or CSS file from a page'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3405249017195979413.post-844036918485072129</id><published>2010-08-17T23:10:00.002+04:00</published><updated>2010-08-17T23:12:08.418+04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Joomla"/><category scheme="http://www.blogger.com/atom/ns#" term="joomla books"/><category scheme="http://www.blogger.com/atom/ns#" term="joomla tutorials"/><title type='text'>Recommended Joomla books</title><content type='html'>I have come across these books during my career as a programmer and I can say, they are worth every penny. I highly recommend you buy them if you are into Joomla development.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.amazon.com/Joomla-Start-Finish-Maintain-Programmer/dp/047057089X?ie=UTF8&amp;amp;tag=webprogramm03-20&amp;amp;link_code=bil&amp;amp;camp=213689&amp;amp;creative=392969&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;Joomla! Start to Finish: How to Plan, Execute, and Maintain Your Web Site (Wrox Programmer to Programmer)&quot; height=&quot;200&quot; src=&quot;http://ws.amazon.com/widgets/q?MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;ID=AsinImage&amp;amp;WS=1&amp;amp;Format=_SL160_&amp;amp;ASIN=047057089X&amp;amp;tag=webprogramm03-20&quot; width=&quot;160&quot; /&gt;&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=webprogramm03-20&amp;amp;l=bil&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=047057089X&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;Joomla! Start to Finish: How to Plan, Execute, and Maintain Your Web Site&lt;/span&gt;&lt;br /&gt;
$38.54&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.amazon.com/Joomla-1-5-Building-Successful-Powered/dp/0137012314?ie=UTF8&amp;amp;tag=webprogramm03-20&amp;amp;link_code=bil&amp;amp;camp=213689&amp;amp;creative=392969&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;Joomla! 1.5: A User&#39;s Guide: Building a Successful Joomla! Powered Website (2nd Edition)&quot; height=&quot;200&quot; src=&quot;http://ws.amazon.com/widgets/q?MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;ID=AsinImage&amp;amp;WS=1&amp;amp;Format=_SL160_&amp;amp;ASIN=0137012314&amp;amp;tag=webprogramm03-20&quot; width=&quot;150&quot; /&gt;&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=webprogramm03-20&amp;amp;l=bil&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=0137012314&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;Joomla! 1.5: A User&#39;s Guide: Building a Successful Joomla! Powered website&lt;/span&gt;&lt;br /&gt;
$29.69&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.amazon.com/Joomla-Bible-Ric-Shreves/dp/0470509570?ie=UTF8&amp;amp;tag=webprogramm03-20&amp;amp;link_code=bil&amp;amp;camp=213689&amp;amp;creative=392969&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;Joomla! Bible&quot; src=&quot;http://ws.amazon.com/widgets/q?MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;ID=AsinImage&amp;amp;WS=1&amp;amp;Format=_SL160_&amp;amp;ASIN=0470509570&amp;amp;tag=webprogramm03-20&quot; /&gt;&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=webprogramm03-20&amp;amp;l=bil&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=0470509570&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;Joomla! Bible&lt;/span&gt;&lt;br /&gt;
$29.69&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.amazon.com/Learning-Joomla-1-5-Extension-Development/dp/1847196209?ie=UTF8&amp;amp;tag=webprogramm03-20&amp;amp;link_code=bil&amp;amp;camp=213689&amp;amp;creative=392969&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; display: inline !important; float: left; margin-bottom: 1em; margin-right: 1em;&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;Learning Joomla! 1.5 Extension Development&quot; src=&quot;http://ws.amazon.com/widgets/q?MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;ID=AsinImage&amp;amp;WS=1&amp;amp;Format=_SL160_&amp;amp;ASIN=1847196209&amp;amp;tag=webprogramm03-20&quot; /&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;Learning Joomla! 1.5 Extension Development&lt;/span&gt;&lt;br /&gt;
$34.08&lt;br /&gt;
&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=webprogramm03-20&amp;amp;l=bil&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=1847196209&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;</content><link rel='replies' type='application/atom+xml' href='http://wprogramming.blogspot.com/feeds/844036918485072129/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wprogramming.blogspot.com/2010/08/recommended-joomla-books.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3405249017195979413/posts/default/844036918485072129'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3405249017195979413/posts/default/844036918485072129'/><link rel='alternate' type='text/html' href='http://wprogramming.blogspot.com/2010/08/recommended-joomla-books.html' title='Recommended Joomla books'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3405249017195979413.post-3480459686751445115</id><published>2010-04-22T22:16:00.008+04:00</published><updated>2010-08-17T22:57:50.226+04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="joomla tutorials"/><title type='text'>Joomla get current language</title><content type='html'>&lt;div&gt;The following code might be useful to you if you want to get the current language in your custom component/module/plugin.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;It will get the current language that is active on the website:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;blockquote&gt;$lang =&amp;amp; JFactory::getLanguage();&lt;br /&gt;
echo &quot;The current language is:&quot;. $lang-&amp;gt;getName(); &lt;/blockquote&gt;&lt;br /&gt;
&lt;/div&gt;Reference : &lt;a href=&quot;http://docs.joomla.org/JFactory/getLanguage&quot;&gt;JFactory/getLanguage - Joomla! Documentation&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;iframe align=&quot;left&quot; frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=webprogramm03-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=1847196209&amp;amp;fc1=D4D4D4&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=FCCF55&amp;amp;bc1=363636&amp;amp;bg1=363636&amp;amp;f=ifr&quot; style=&quot;align: left; height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;&quot;&gt;&lt;/iframe&gt;If you are learning to develop your own Joomla component, module or plugin, the following book is a must have.&lt;br /&gt;
&lt;br /&gt;
You can get it for cheap on Amazon.</content><link rel='replies' type='application/atom+xml' href='http://wprogramming.blogspot.com/feeds/3480459686751445115/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wprogramming.blogspot.com/2010/04/joomla-get-current-language.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3405249017195979413/posts/default/3480459686751445115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3405249017195979413/posts/default/3480459686751445115'/><link rel='alternate' type='text/html' href='http://wprogramming.blogspot.com/2010/04/joomla-get-current-language.html' title='Joomla get current language'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3405249017195979413.post-833801217825744890</id><published>2010-04-11T08:43:00.002+04:00</published><updated>2010-08-17T23:01:26.899+04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Joomla"/><title type='text'>Adding additional Joomla registration fields</title><content type='html'>The default Joomla registration page is very basic. In many situations, one might want to add field to it. This is how to do it:&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Just add the fields you want to the following files:&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;For saving the info&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;libraries/joomla/database/table/user.php&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;Display on registration page&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;components/com_user/views/register/tmpl/default.php&amp;nbsp;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;For updating info&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;components/com_user/views/user/tmpl/form.php&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;Backend user form&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;administrator/components/com_users/views/user/tmpl/form.php&lt;/blockquote&gt;&lt;a href=&quot;http://www.amazon.com/Joomla-Bible-Ric-Shreves/dp/0470509570?ie=UTF8&amp;amp;tag=webprogramm03-20&amp;amp;link_code=bil&amp;amp;camp=213689&amp;amp;creative=392969&quot; imageanchor=&quot;1&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;Joomla! Bible&quot; src=&quot;http://ws.amazon.com/widgets/q?MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;ID=AsinImage&amp;amp;WS=1&amp;amp;Format=_SL160_&amp;amp;ASIN=0470509570&amp;amp;tag=webprogramm03-20&quot; /&gt;&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=webprogramm03-20&amp;amp;l=bil&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=0470509570&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wprogramming.blogspot.com/feeds/833801217825744890/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wprogramming.blogspot.com/2010/04/adding-additional-joomla-registration.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3405249017195979413/posts/default/833801217825744890'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3405249017195979413/posts/default/833801217825744890'/><link rel='alternate' type='text/html' href='http://wprogramming.blogspot.com/2010/04/adding-additional-joomla-registration.html' title='Adding additional Joomla registration fields'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3405249017195979413.post-2519137170295990868</id><published>2010-04-11T08:36:00.003+04:00</published><updated>2010-08-17T16:27:18.483+04: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'>Replacing MySQL characters</title><content type='html'>The following MySQL query will replace all occurences of&amp;nbsp;&lt;b&gt;Ã§ &lt;/b&gt;in the column &#39;name&#39; of the &#39;customers&#39; table with&amp;nbsp;&lt;b&gt;ç&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace;&quot;&gt;UPDATE customers SET name = replace(name,&#39;Ã§&#39;,&#39;ç&#39;);&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;
I found it useful especially after copying databases. Copying databases with different collations tend to screw up the characters (especially when working with French accents). So applying this query will fix things up.&lt;br /&gt;
&lt;br /&gt;
This is also useful in many other situations where we will want to replace a character in the database. I leave it to you to think it out.</content><link rel='replies' type='application/atom+xml' href='http://wprogramming.blogspot.com/feeds/2519137170295990868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wprogramming.blogspot.com/2010/04/replacing-mysql-characters.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3405249017195979413/posts/default/2519137170295990868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3405249017195979413/posts/default/2519137170295990868'/><link rel='alternate' type='text/html' href='http://wprogramming.blogspot.com/2010/04/replacing-mysql-characters.html' title='Replacing MySQL characters'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3405249017195979413.post-6938780976824883707</id><published>2010-04-11T08:28:00.002+04:00</published><updated>2010-08-17T23:42:32.314+04: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'>Update mySQL table with values from another table</title><content type='html'>Suppose we have two tables &lt;b&gt;myCustomers&amp;nbsp;&lt;/b&gt;and &lt;b&gt;allCustomers&lt;/b&gt;. We can update the value of table&amp;nbsp;&lt;b&gt;myCustomers &lt;/b&gt;based on the value that is common to both tables.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Example&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;blockquote&gt;UPDATE&amp;nbsp;myCustomers&amp;nbsp;,&amp;nbsp;allCustomers&lt;/blockquote&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;blockquote&gt;SET&amp;nbsp;myCustomers.name =&amp;nbsp;allCustomers.name&lt;/blockquote&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;blockquote&gt;WHERE&amp;nbsp;myCustomers.email =&amp;nbsp;allCustomers.email;&lt;/blockquote&gt;&lt;/div&gt;&lt;br /&gt;
What we did here is update all the names of table &#39;myCustomers&#39;&amp;nbsp;with the names of table &#39;allCustomers&#39;&amp;nbsp;where their email matches.&lt;br /&gt;
&lt;br /&gt;
Table &#39;myCustomers&#39; can be a smaller table that stores a small amount of info and table &#39;allCustomers&#39; can be a reference master table.</content><link rel='replies' type='application/atom+xml' href='http://wprogramming.blogspot.com/feeds/6938780976824883707/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wprogramming.blogspot.com/2010/04/update-mysql-table-with-values-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3405249017195979413/posts/default/6938780976824883707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3405249017195979413/posts/default/6938780976824883707'/><link rel='alternate' type='text/html' href='http://wprogramming.blogspot.com/2010/04/update-mysql-table-with-values-from.html' title='Update mySQL table with values from another table'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3405249017195979413.post-9204570927368706742</id><published>2010-04-11T08:16:00.001+04:00</published><updated>2010-08-17T23:43:14.457+04: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'>French unreadable characters</title><content type='html'>To fix the problem of unreadable french characters when pulling info from a MySQL database, do this:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;blockquote&gt;$query&amp;nbsp;= mysql_query(&quot;SET NAMES UTF8&quot;,$conn) or die(mysql_error());&lt;/blockquote&gt;&lt;/div&gt;&lt;br /&gt;
That is, we change the collation of the names column to utf8.</content><link rel='replies' type='application/atom+xml' href='http://wprogramming.blogspot.com/feeds/9204570927368706742/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wprogramming.blogspot.com/2010/04/french-unreadable-characters.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3405249017195979413/posts/default/9204570927368706742'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3405249017195979413/posts/default/9204570927368706742'/><link rel='alternate' type='text/html' href='http://wprogramming.blogspot.com/2010/04/french-unreadable-characters.html' title='French unreadable characters'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3405249017195979413.post-7452892518994910695</id><published>2010-04-11T08:02:00.007+04:00</published><updated>2010-08-17T23:47:54.857+04: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'>Display number of items in category / subcategory</title><content type='html'>In many cases, one might want to display  the number of items found in a category / subcategory. This is specially the  case for classifieds websites.&lt;br /&gt;
&lt;br /&gt;
For example, &lt;br /&gt;
&lt;br /&gt;
Vehicles (30)&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Cars &amp;nbsp;(15)&lt;/li&gt;
&lt;li&gt;Bikes (13)&lt;/li&gt;
&lt;li&gt;Other (2)&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
This can be done by querying the database.  In this case, I am using MySQL.&lt;br /&gt;
&lt;br /&gt;
Let’s  assume that we are passing the category id in the URL. So,&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Get the category id from the  URL&lt;/li&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;&lt;blockquote&gt;$cat =  mysql_real_escape_string($_GET[&#39;category&#39;]);&lt;/blockquote&gt;&lt;/div&gt;
&lt;li&gt;Query the database with that id&lt;/li&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;&lt;blockquote&gt;$query = &#39;SELECT COUNT(*) as count FROM vehicles  WHERE catId = &#39;$cat&#39;&quot;;&lt;/blockquote&gt;&lt;/div&gt;
&lt;li&gt;Build the query&lt;/li&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;&lt;blockquote&gt;$result = mysql_query($query);&lt;/blockquote&gt;&lt;/div&gt;
&lt;li&gt;Get the resulting row&lt;/li&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;&lt;blockquote&gt;$row = mysql_fetch_array($result);&lt;/blockquote&gt;&lt;/div&gt;
&lt;li&gt;&amp;nbsp;Finally, get the count field from the  resulting row (this is the data we want)&lt;/li&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;&lt;blockquote&gt;$num_items_in_category = $row[&#39;count&#39;];&lt;/blockquote&gt;&lt;/div&gt;&lt;/ol&gt;Your comments are welcomed.</content><link rel='replies' type='application/atom+xml' href='http://wprogramming.blogspot.com/feeds/7452892518994910695/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wprogramming.blogspot.com/2010/04/display-number-of-items-in-category.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3405249017195979413/posts/default/7452892518994910695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3405249017195979413/posts/default/7452892518994910695'/><link rel='alternate' type='text/html' href='http://wprogramming.blogspot.com/2010/04/display-number-of-items-in-category.html' title='Display number of items in category / subcategory'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3405249017195979413.post-5023609120167539757</id><published>2010-04-06T10:30:00.004+04:00</published><updated>2010-04-23T15:03:36.159+04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ajax"/><category scheme="http://www.blogger.com/atom/ns#" term="ajax programming"/><category scheme="http://www.blogger.com/atom/ns#" term="ajax tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="ajax web development 2.0"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript jquery"/><category scheme="http://www.blogger.com/atom/ns#" term="jquery"/><category scheme="http://www.blogger.com/atom/ns#" term="jquery tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="jquery tutorials"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="php tutorial"/><title type='text'>AJAX post with JQuery</title><content type='html'>JQuery allows us to pass info to the server and get back results &lt;b&gt;without leaving the page&lt;/b&gt;. This comes in handy for example when we want to submit a form, authenticate users against a database, load photos etc. I mostly use it for when I want to communicate with a MySQL database.&lt;br /&gt;
&lt;br /&gt;
Here is an example where I send an id to the server which queries a MySQL database and return back the user&#39;s name for me.&lt;br /&gt;
&lt;br /&gt;
I have a div called &#39;loading&#39; in my HTML form. Before passing information to the server, I want the user to get a message, tell him to wait (the time that the information is being fetched from the server). So, I display a message in the &#39;loading&#39; div.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;$(&quot;#loading&quot;).html(&#39;Please wait...&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
I then get the value that I want to pass to the server from my form.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;var id = $(&#39;#userid&#39;).val();&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
I then create a data string of all the variables that I want to send to the server. In this case I will only send an id to the server.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;var dataString             =     &#39;id=&#39;+ id;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Now, we move on to the AJAX part.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;$j.ajax({&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;    type: &quot;POST&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;url: &quot;components/com_etudes/assets/ajax/getData.php&quot;,&lt;/span&gt; &lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;    data: dataString,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;success: function(data) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;    &lt;/span&gt; &lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;        //Display a message&lt;/span&gt; &lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;        $j(&quot;#messages&quot;).html(data&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;).css(&quot;color&quot;,&quot;green&quot;);&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;        &lt;/span&gt; &lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;    }&lt;/span&gt; &lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;  });&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;POST :&lt;/b&gt; The way we want to submit the data to the server. We can use POST or GET&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;URL:&lt;/b&gt; This is the path to the PHP script that will receive the data, processes it and return a response to the Client browser.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;DATA:&lt;/b&gt; This is the data that we have (concatenation of all the variables that we have)&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;br /&gt;
&lt;b&gt; success: function(data) &lt;/b&gt;&lt;/span&gt;&lt;b&gt;:&lt;/b&gt; This means that on success (i.e. if the script has been executed on the server without error). &#39;data&#39; is a variable that contains the result sent from the server.&lt;br /&gt;
&lt;br /&gt;
You see that I used the variable &#39;data&#39; and updated the HTML of a div called &#39;messages&#39;. That is this div &#39;messages&#39; will get as content whatever was returned from the server.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;SERVER PART&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: georgia;&quot;&gt;The &lt;/span&gt;&lt;span style=&quot;font-family: georgia; font-weight: bold;&quot;&gt;getData.php &lt;/span&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;is simple.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt; &lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;header(&#39;Content-Type: text/html; charset=iso-8859-1&#39;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;//Database connection&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;include(&#39;db.php&#39;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;//POST Variables&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;$id &amp;nbsp;=    $_POST[&#39;id&#39;];&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;$msg                                        =    &#39;&#39;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;//Get the user&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;$SQL     = &quot;SELECT * FROM users WHERE id = &quot;.$id;&lt;/span&gt;  &lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;//execute the query&lt;/span&gt; &lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;$result        = mysql_query($SQL,$conn) or die(mysql_error());&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;$row = mysql_fetch_array($result);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;echo $row[&#39;name&#39;];&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia,&#39;Times New Roman&#39;,serif;&quot;&gt;So we basically passed an id to the server which queried a MySQL database and responded back with the name of the user that&amp;nbsp;corresponded&amp;nbsp;to the id passed. Simple!&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia,&#39;Times New Roman&#39;,serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia,&#39;Times New Roman&#39;,serif;&quot;&gt;Stay tuned for some other tips coming soon.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wprogramming.blogspot.com/feeds/5023609120167539757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wprogramming.blogspot.com/2010/04/ajax-post-with-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3405249017195979413/posts/default/5023609120167539757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3405249017195979413/posts/default/5023609120167539757'/><link rel='alternate' type='text/html' href='http://wprogramming.blogspot.com/2010/04/ajax-post-with-jquery.html' title='AJAX post with JQuery'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3405249017195979413.post-7498477825451100723</id><published>2010-04-05T16:43:00.002+04:00</published><updated>2010-08-20T11:15:54.257+04:00</updated><title type='text'>Hello World</title><content type='html'>&lt;iframe align=&quot;left&quot; frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=webprogramm03-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=B0017Q3TJ0&amp;amp;fc1=D4D4D4&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=FCCF55&amp;amp;bc1=363636&amp;amp;bg1=363636&amp;amp;f=ifr&quot; style=&quot;height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;&quot;&gt;&lt;/iframe&gt;This blog was created to provide tips and tricks to web programmers as I gain experience in my Web development career. I will try to structure my information into a step by step guide so that it can easily be understood. I will also be updating the blog regularly and answering to any questions you may have (in your comments). So be sure to subscribe to the blog.</content><link rel='replies' type='application/atom+xml' href='http://wprogramming.blogspot.com/feeds/7498477825451100723/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wprogramming.blogspot.com/2010/04/tips-and-tricks-to-programming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3405249017195979413/posts/default/7498477825451100723'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3405249017195979413/posts/default/7498477825451100723'/><link rel='alternate' type='text/html' href='http://wprogramming.blogspot.com/2010/04/tips-and-tricks-to-programming.html' title='Hello World'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>