<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Vision Master Designs &#187; PHP &amp; MySQL</title>
	<atom:link href="http://visionmasterdesigns.com/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://visionmasterdesigns.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 29 Oct 2009 20:00:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Tutorial : Auto Completer using Prototype, Script.aculo.us</title>
		<link>http://visionmasterdesigns.com/tutorial-auto-completer-using-prototype-scriptaculous/</link>
		<comments>http://visionmasterdesigns.com/tutorial-auto-completer-using-prototype-scriptaculous/#comments</comments>
		<pubDate>Sun, 26 Oct 2008 13:35:43 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Javascript Frameworks]]></category>
		<category><![CDATA[Prototype, Script.aculo.us]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP & MySQL]]></category>
		<category><![CDATA[Prototype]]></category>
		<category><![CDATA[Script.aculo.us]]></category>

		<guid isPermaLink="false">http://www.visionmasterdesigns.com/?p=770</guid>
		<description><![CDATA[How many of you have always dreamt of creating an Auto Suggest Box. I bet everyone must have seen one of these somewhere or the other. if you use Gmail to send mails, you might recall that while typing the To address, Gmail shows a probable list of users from your address book. Nowadays most [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin: 0 0 0.6em 0.6em;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fvisionmasterdesigns.com%2Ftutorial-auto-completer-using-prototype-scriptaculous%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fvisionmasterdesigns.com%2Ftutorial-auto-completer-using-prototype-scriptaculous%2F&amp;source=rowoot&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>How many of you have always dreamt of creating an Auto Suggest Box. I bet everyone must have seen one of these somewhere or the other. if you use Gmail to send mails, you might recall that while typing the To address, Gmail shows a probable list of users from your address book. Nowadays most of the modern browsers also have this Auto Suggest control built in them, i.e when the user begins to type in a text box, a menu appears below the text offering completion suggestions. </p>
<p>Today I am going to teach you how to create an Auto Suggest Box using Prototype, Script.aculo.us. The script.aculo.us auto suggest box (autocompleter) replicates this control, but gives the developer control of the probable suggestions.</p>
<p>Index</p>
<ul>
<li>Page 1 : <a title="Introduction" href="http://www.visionmasterdesigns.com/2008/10/tutorial-auto-completer-using-prototype-scriptaculous/">Introduction and </a></li>
<li>Page 2 : <a title="Auto Suggest Box (local)" href="http://www.visionmasterdesigns.com/2008/10/tutorial-auto-completer-using-prototype-scriptaculous/2/">Auto Suggest Box (local)</a></li>
<li>Page 3 : <a title="AJAX Auto Suggest Box (remote via PHP/MySQL)" href="http://www.visionmasterdesigns.com/2008/10/tutorial-auto-completer-using-prototype-scriptaculous/3/">AJAX Auto Suggest Box (remote via PHP/MySQL)</a></li>
</ul>
<h4>Demo &amp; Source Download</h4>
<p>Type out the name of the states of U.S.A.<br />
Local Auto Suggest Box Demo : <a href="http://www.visionmasterdesigns.com/demo/autocompleter/local.html" target="_blank">Click Here</a><br />
Remote Auto Suggest Box Demo : <a href="http://www.visionmasterdesigns.com/demo/autocompleter/ajax.html" target="_blank">Click Here</a></p>
<p>Download Source <a href="http://www.visionmasterdesigns.com/demo/autocompleter/autocompleter_src.rar">Here</a><br />
<span id="more-770"></span></p>
<h2>Problem Statement</h2>
<p>Lets try creating an Auto Suggest Box which displays the states of America as the user begins to type a state&#8217;s name in the text box.</p>
<h2>Solution</h2>
<p>Before using any functions, first we need to make our HTML page i.e how the suggestion box is going to look.</p>
<ol>
<li>Create an empty HTML file.</li>
<li>
    First, to take the input of any state name from the user we need an input box.<br />
    Second, we need a container to display all the probable suggestions i.e different names of states according to User input.</p>
<p>    Lets create these right now.</p>
<pre class="brush: html">
    &lt;!-- This code will be added inside the  &lt;strong&gt;&lt;BODY&gt;&lt;/strong&gt; tag of the HTML page --&gt;
    &lt;input type=&quot;text&quot; name=&quot;state_input&quot; id=&quot;state_input&quot; size=&quot;30&quot; /&gt;
    &lt;div id=&quot;state_suggestions&quot;&gt;&lt;!-- container for list of probable suggestions !--&gt;&lt;/div&gt;
    </pre>
</li>
<li>
    Now that we have designed our suggestion box, its time to implement the Auto Suggest Box method. Since this method is readily available as a part of Script.aculo.us, we need to include the scriptaculous file, and since scriptaculous depends on prototype, we need to include the prototype file to our HTML document. Type following code inside the <strong>&lt;HEAD&gt;</strong> tag.</p>
<pre class="brush: javascript">
	&lt;script src=&quot;js/lib/prototype.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
    &lt;script src=&quot;js/src/scriptaculous.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
    </pre>
</li>
<li>
	The HTML page should look something like this.</p>
<pre class="brush: html">
    &lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
    &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
    &lt;head&gt;
    &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
    &lt;title&gt;Untitled Document&lt;/title&gt;
    &lt;script src=&quot;js/lib/prototype.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
	&lt;script src=&quot;js/src/scriptaculous.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
    &lt;input type=&quot;text&quot; name=&quot;state_input&quot; id=&quot;state_input&quot; size=&quot;30&quot; /&gt;
    &lt;div id=&quot;state_suggestions&quot;&gt;&lt;!-- container for list of probable suggestions !--&gt;&lt;/div&gt;

    &lt;/body&gt;
    &lt;/html&gt;
    </pre>
</li>
</ol>
<p>Now that we have a HTML page ready, preview it. Obviously it won&#8217;t work yet. We still have to define the AutoCompleter function.</p>
<p>There are 2 ways to achieve our goal. Script.aculo.us&#8217;s Autocompleter comes in two flavors.</p>
<ol>
<li><span class="code">Autocompleter.Local</span> : The local array autocompleter. Used when you’d prefer to inject an array of autocompletion options into the page, rather than sending out Ajax queries.</li>
<li><span class="code">Ajax.Autocompleter</span> : Which relies on a remote server to give it suggestions, making an AJAX Request whenever suggestions need to be retrieved.</li>
</ol>
<p>Now both have thier Pros and Cons. I`ll explain each one of them and how they can be used.</p>
]]></content:encoded>
			<wfw:commentRss>http://visionmasterdesigns.com/tutorial-auto-completer-using-prototype-scriptaculous/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Tutorial : Creating &#8220;Pretty SEO URLS&#8221; using Apache&#8217;s mod_rewrite</title>
		<link>http://visionmasterdesigns.com/tutorial-creating-pretty-seo-url-using-apache-mod-rewrite/</link>
		<comments>http://visionmasterdesigns.com/tutorial-creating-pretty-seo-url-using-apache-mod-rewrite/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 09:11:30 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[PHP & MySQL]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Website Optimization]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[mod_rewrite]]></category>

		<guid isPermaLink="false">http://www.visionmasterdesigns.com/?p=323</guid>
		<description><![CDATA[Imagine this, You have a dynamic site powered by PHP/MySQL, its doing ok, you have submitted your website URL to all the known search engines, but still your site doesn&#8217;t seem to get much traffic from the search engines&#8230;ever wondered why ? Well firstly, search engines have billions of pages to search. Imagine your link [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin: 0 0 0.6em 0.6em;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fvisionmasterdesigns.com%2Ftutorial-creating-pretty-seo-url-using-apache-mod-rewrite%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fvisionmasterdesigns.com%2Ftutorial-creating-pretty-seo-url-using-apache-mod-rewrite%2F&amp;source=rowoot&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Imagine this, You have a dynamic site powered by PHP/MySQL, its doing ok, you have submitted your website URL to all the known search engines, but still your site doesn&#8217;t seem to get much traffic from the search engines&#8230;ever wondered why ?</p>
<p>Well firstly, search engines have billions of pages to search. Imagine your link to be something like <span class="code">www.yourdomain.com/index.php?page=aboutme</span>, its tough for any search engine to comprehend any keywords from the link.<br />
But how about <span class="code">www.yourdomain.com/page/about-me.html</span> ? These links are static Links, SEO Friendly Links, &#8220;Pretty Links&#8221;.</p>
<p>So today we are going to learn how to convert your ugly links into pretty links.</p>
<h4>Index</h4>
<ol>
<li>Step 1 : Enable mod_rewrite in httpd.conf</li>
<li>Step 2 : Create A Simple PHP file</li>
<li>Step 3 : .htaccess file<br />
Method 1 &#8211; For only a single Variable<br />
Method 2 &#8211; For 1 and more than 1 Variable(s)
</li>
<li>Conclusion</li>
</ol>
<p>Ugly URLs<br />
<a href="http://www.visionmasterdesigns.com/demo/seo/test.php?page=page1" target="_blank">http://www.visionmasterdesigns.com/demo/seo/test.php?page=page1</a><br />
<a href="http://www.visionmasterdesigns.com/demo/seo/test.php?page=page1&amp;var=foo" target="_blank">http://www.visionmasterdesigns.com/demo/seo/test.php?page=page1&amp;var=foo </a></p>
<p>Pretty URLs<br />
<a href="http://www.visionmasterdesigns.com/demo/seo/page1.html" target="_blank">http://www.visionmasterdesigns.com/demo/seo/page1.html</a><br />
<a href="http://www.visionmasterdesigns.com/demo/seo/page1/foo.html" target="_blank">http://www.visionmasterdesigns.com/demo/seo/page1/foo.html</a></p>
<p>Click <a href="http://www.visionmasterdesigns.com/demo/seo/seo.zip">Here</a> to download the script files.<br />
<span id="more-323"></span></p>
<h2 align="center">Step 1 : Enable mod_rewrite in httpd.conf</h2>
<p>Normally webservers already have mod_rewrite enabled. If it is not enabled, then you can request your host to enable it.</p>
<p>If you are going to try this tutorial in your local machine. Do check whether <span class="code">mod_rewrite</span> module has been enabled in Apache. Do the following.</p>
<ol>
<li>Navigate to your apache folder and open httpd.conf</li>
<li>Search for
<pre lang="apache">#LoadModule rewrite_module modules/mod_rewrite.so</pre>
</li>
<li>Remove the commenting character i.e #, then save the file.</li>
<li>Restart the Server</li>
</ol>
<h4>About the .htaccess file</h4>
<p>You must have seen or heard about <span class="code">.htaccess</span> file somewhere.</p>
<p><strong>Quote from wikipedia :</strong><br />
In the Apache web server, .htaccess (hypertext access) is the default name of directory-level configuration files. A .htaccess file is placed in a particular directory, and the directives in the .htaccess file apply to that directory, and all subdirectories thereof. It provides the ability to customize configuration for requests to the particular directory.</p>
<p>Normally the .htaccess file must be present in the directory where your script is stored.<br />
For Example : If my script is<br />
<span class="code">myserver.dev/prettyurl/test.php</span><br />
 then my <span class="code">.htaccess</span> file will be saved in<br />
  <span class="code">C:\server\www\myserver.dev\public_html\prettyurl\.htaccess</span>  <b>*</b></p>
<p>*This is applicable if you have followed &#8211;<br />
<a href="http://www.visionmasterdesigns.com/2008/07/tutorial-installing-apache-php-5-mysql-5-phpmyadmin-windows-vista-xp/">Tutorial : Installing Apache, PHP 5, MySQL 5 &#038; PhpMyAdmin 2.11 in Windows Vista/XP</a></p>
<h2 align="center">Step 2 : Create A Simple PHP file</h2>
<p>Lets create a simple PHP file. PHP allows us to retrieve values from the URL iself using $_GET function.</p>
<p>For Example :<br />
<span class="code">http://myserver.dev/prettyurl/test.php?page=mypagename</span>.<br />
$_GET['page'] would give the value of page in the above url.</p>
<p><span class="code">http://myserver.dev/prettyurl/test.php?page=mypagename&#038;var=secondvar</span>.<br />
We can have retrieve quite a lot of data from the URLs by using multiple $_GET functions. In the above URL we can have $_GET['page'] and $_GET['var']</p>
<pre class="brush: php">
&lt;?php

//test.php
//storing the retrieved val from URL into a variable
$p = $_GET[&#039;page&#039;];
$q = $_GET[&#039;var&#039;];

switch($p) {
    case &#039;page1&#039;:
    // if $p = page1 i.e url was something like test.php?page=page1
  		switch($q) {
		case &#039;boo&#039;:
		//if $p=boo then url is somehting like test.php?page=page1&amp;amp;amp;var=boo
		echo &quot;&lt;h2&gt;This is page1 And BOO&lt;/h2&gt;&lt;br /&gt;&quot;;
		break;
		case &#039;foo&#039;:
		echo &quot;&lt;h2&gt;This is page1 And FOO&lt;/h2&gt;&lt;br /&gt;&quot;;
		break;
		default:
		// if $p = page1 i.e url was something like test.php?page=page1
		echo &quot;&lt;h2&gt;This is page1&lt;/h2&gt;&quot;;
		break;
		}
    break;
    case &#039;page2&#039;:
    // if $p = page2 i.e url was something like test.php?page=page2
    echo &quot;&lt;h2&gt;This is page2&lt;/h2&gt;&quot;;
    break;
    case &#039;page3&#039;:
    // if $p = page3 i.e url was something like test.php?page=page3
    echo &quot;&lt;h2&gt;This is page3&lt;/h2&gt;&quot;;
    break;
    case &#039;page4&#039;:
    // if $p = page4 i.e url was something like test.php?page=page4
    echo &quot;&lt;h2&gt;This is page4&lt;/h2&gt;&quot;;
    break;
    default:
    // if page != any of the above, then default is executed
    echo &quot;&lt;h2&gt;This is the Default Page&lt;/h2&gt;&quot;;
	break;
}
?&gt;
</pre>
<p>Save the file as <span class="code">test.php</span>.</p>
<p>Test out the script, if we access<br />
<a href="http://myserver.dev/prettyurl/test.php?page=page1">http://myserver.dev/prettyurl/test.php?page=page1</a><br />
the result will be &#8216;This is page1&#8242;.<br />
Similarly <a href="http://myserver.dev/prettyurl/test.php?page=page2">http://myserver.dev/prettyurl/test.php?page=page2</a><br />
will show the output &#8216;This is page2&#8242; and so on.</p>
<p>If we access<br />
<a href="http://myserver.dev/prettyurl/test.php?page=page1&#038;var=foo">http://myserver.dev/prettyurl/test.php?page=page1&#038;var=foo </a><br />
the output will be &#8216;This is page1 And foo&#8217;</p>
<p>This sample code in PHP is to just show you how a general linking system works. It shows how $_GET works and how we can add data in the URL&#8217;s using &#8216;&#038;&#8217; operator.</p>
<h2 align="center">Step 3 : .htaccess file</h2>
<p>There are different methods to create &#8220;Pretty URLS&#8221;. I`ll just discuss the most common and the most optimized ones.</p>
<p>Ok ! Firstly our local server won`t have a .htaccess file, so we will have to create one. Fire up notepad, then type the following code.<br />
Save the file as <span class="code">.htaccess</span>. Place it in the directory where you have saved your <span class="code">test.php</span> script.</p>
<h4>Method 1 &#8211; For only a single Variable</h4>
<p>Consider our dynamic URL to be<br />
<span class="code">http://myserver.dev/prettyurl/test.php?page=page2</span><br />
and we want our pretty url to look something like<br />
<span class="code">http://myserver.dev/prettyurl/page2.html</span> </p>
<pre lang="apache">
#.htaccess code
RewriteEngine On
RewriteRule ^(.*)\.html$ test.php?page=$1 [L]
</pre>
<p>Let me explain what every line does.</p>
<ul>
<li><span class="code">RewriteEngine On</span><br />
This tells to start the Rewrite Engine.</li>
<li><span class="code">RewriteRule ^(.*)\.html$ test.php?page=$1 [L]</span><br />
The basic syntax of<br />
RewriteRule pattern target_url [flag,flag,flag,…]</p>
<ol>
<li>pattern is <span class="code">^(.*)\.html$</span><br />
() &#8211; Parentheses allow you to group several characters as a unit and also to capture the results of a match for later use. The ability to treat several characters as a unit is extremely useful in pattern matching. </p>
<p><span class="code">(.*)</span> &#8211; Matches anything.<br />
Eg: http://myserver.dev/prettyurl/page1.html where (.*)\.html matches page1.html
</li>
<li>
target_url is <span class="code">test.php?page=$1 </span><br />
$1 is a variable where $1 = (.*) from the pattern.
</li>
<li>
flag is <span class="code">[L]</span>.<br />
There are various flags. [L] means, If there is a match with a particular rewrite rule, It has to be the last rewrite rule to be executed.
</li>
</ol>
</li>
</ul>
<p>Now lets test run our script. If the dynamic link is like<br />
<a href="http://myserver.dev/prettyurl/test.php?page=page1">http://myserver.dev/prettyurl/test.php?page=page1</a><br />
then your pretty link will be<br />
<a href="http://myserver.dev/prettyurl/page1.html">http://myserver.dev/prettyurl/page1.html</a><br />
Similarly for page=page2 the link will be page2.html ,page=page3 the link will be page3.html.</p>
<p>Phew ! That took a lot of time. If you are able to see the same output for both the ugly links and the pretty links, then you Rewrite rules are working perfectly.</p>
<h4>Method 2 &#8211; For 1 and more than 1 Variable(s)</h4>
<p>Now what if your dynamic URL was like<br />
<span class="code">http://myserver.dev/prettyurl/test.php?page=page1&#038;var=foo</span>.<br />
For the above dynamic URL we want our static URL to look something like<br />
<span class="code">http://myserver.dev/prettyurl/page1/foo.html</span>.<br />
We want the first variable to act as a directory, while the second one should be the file name.</p>
<p>Note that previously page=page1 had become &#8216;page1.html&#8217; since there was just one variable. But now we have 2 variables (page=page1&#038;var=foo) so we the structure should be like &#8216;page1/foo.html&#8217;</p>
<p>We have to write a new RewriteRule to support 2 variables.<br />
<strong>Remember : As your variables increase, the new Rewrite rules come before the previous ones.</strong></p>
<p>We are basically extending Method 1 by adding another RewriteRule to support 2 variables as input.</p>
<pre lang="apache">
RewriteEngine On
RewriteRule ([^/]+)/(.*)\.html$ test.php?page=$1&#038;var=$2 [L]
RewriteRule ^(.*)\.html$ test.php?page=$1 [L]
</pre>
<p>Let me Explain what the new line does.<br />
<span class="code">RewriteRule ([^/]+)/(.*)\.html$ test.php?page=$1&#038;var=$2 [L]</span></p>
<ol>
<li>pattern is <span class="code">([^/]+)/(.*)\.html$</span><br />
<span class="code">([^/]+)</span> &#8211; Which has the effect of matching any characters up to a slash or the end of the string, whichever comes first.<br />
<span class="code">(.*)</span> &#8211; Matches anything</p>
<p><span class="code">([^/]+)/(.*)\.html$</span> &#8211; characters up to slash &#8216;/&#8217; any characters &#8216;.html&#8217;<br />
Eg: page1/foo.html where ([^/]+) matches page1 and (.*)\.html matches foo.html
</li>
<li>
target_url is <span class="code">test.php?page=$1&#038;var=$2 </span><br />
Every variable i.e $1 and $2 matches with the unit inside the paranthesis.<br />
$1 = ([^/]+)<br />
$2 = (.*)
</li>
<li>
flag is <span class="code">[L]</span>.<br />
There are various flags. [L] means, If there is a match with a particular rewrite rule, It has to be the last rewrite rule to be executed.
</li>
</ol>
<p>You can test it out<br />
For all dynamic links like<br />
<a href="http://myserver.dev/prettyurl/test.php?page=page1&#038;var=foo">http://myserver.dev/prettyurl/test.php?page=page1&#038;var=foo </a><br />
will have static URL&#8217;s like<br />
<a href="http://myserver.dev/prettyurl/page1/foo.html">http://myserver.dev/prettyurl/page1/foo.html</a></p>
<h2 align="center">Conclusion</h2>
<p>(Method 1 &nbsp; Method 2)<br />
Thus for all dynamic links like</p>
<p>http://myserver.dev/prettyurl/test.php?page=pagex</p>
<p>will have static URL&#8217;s like</p>
<p>http://myserver.dev/prettyurl/pagex.html</p>
<p>(Method 2)<br />
For all dynamic links like</p>
<p>http://myserver.dev/prettyurl/test.php?page=pagex&#038;var=foo</p>
<p>will have static URL&#8217;s like</p>
<p>http://myserver.dev/prettyurl/pagex/foo.html</p>
<p>This was quite a basic tutorial. It is tough to understand the string matching patterns initially. But the logic is very simple. I hope the tutorial wasn&#8217;t tough to understand. If you guys have any doubts, feel free to comment here, I`ll try to solve them. Cya</p>
<p>Click <a href="http://www.visionmasterdesigns.com/demo/seo/seo.zip">Here</a> to download the files.</p>
]]></content:encoded>
			<wfw:commentRss>http://visionmasterdesigns.com/tutorial-creating-pretty-seo-url-using-apache-mod-rewrite/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Tutorial : AJAX interface/menu using jQuery/PHP</title>
		<link>http://visionmasterdesigns.com/tutorial-ajax-interface-menu-using-jqueryphp/</link>
		<comments>http://visionmasterdesigns.com/tutorial-ajax-interface-menu-using-jqueryphp/#comments</comments>
		<pubDate>Mon, 28 Jul 2008 15:24:34 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Javascript Frameworks]]></category>
		<category><![CDATA[PHP & MySQL]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://blog.visionmasterdesigns.com/?p=218</guid>
		<description><![CDATA[Hello Guys, I have been busy with college lately, since this is my last year in college, I need to do a very cool project to get some good marks . Anyways that doesn`t mean I won`t be postin tutorials here . Want to present your data using AJAX/PHP/MySQL by just coding few lines ? [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin: 0 0 0.6em 0.6em;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fvisionmasterdesigns.com%2Ftutorial-ajax-interface-menu-using-jqueryphp%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fvisionmasterdesigns.com%2Ftutorial-ajax-interface-menu-using-jqueryphp%2F&amp;source=rowoot&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p style="text-align: center;"><a title="Ajax Interface" rel="lightbox[pics218]" href="http://www.visionmasterdesigns.com/blog/wp-content/uploads/2008/07/t1.jpg"><img class="attachment wp-att-219 centered" src="http://www.visionmasterdesigns.com/blog/wp-content/uploads/2008/07/t1.thumbnail.jpg" alt="Ajax Interface" width="350" height="180" /></a></p>
<p>Hello Guys,</p>
<p>I have been busy with college lately, since this is my last year in college, I need to do a very cool project to get some good marks <img src='http://visionmasterdesigns.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . Anyways that doesn`t mean I won`t be postin tutorials here <img src='http://visionmasterdesigns.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . Want to present your data using AJAX/PHP/MySQL by just coding few lines ? Well here it is. This tutorial teaches you how to present data using AJAX (using jQuery) with some neat effects. We can use PHP/MySQL to store the data and call it. In this tutorial I`ll teach you how to do so with PHP. So lets begin !</p>
<p>You can check the demo <a href="http://visionmasterdesigns.com/demo/ajaxinterface/" target="_blank">HERE</a>.<br />
You can download these files <a href="http://visionmasterdesigns.com/demo/ajaxinterface/interface.zip">HERE</a></p>
<h4>Index</h4>
<ol>
<li>Create the HTML page &#8211; <span class="code">index.html</span></li>
<li>
<ul>
<li><a href="http://www.visionmasterdesigns.com/2008/07/tutorial-ajax-interface-menu-using-jqueryphp/#css">The CSS</a></li>
<li><a href="http://www.visionmasterdesigns.com/2008/07/tutorial-ajax-interface-menu-using-jqueryphp/#html">The HTML</a></li>
<li><a href="http://www.visionmasterdesigns.com/2008/07/tutorial-ajax-interface-menu-using-jqueryphp/#javascript">The Javascript</a></li>
<li><a href="http://www.visionmasterdesigns.com/2008/07/tutorial-ajax-interface-menu-using-jqueryphp/#interface">Final interface.html page</a></li>
</ul>
</li>
<li>Create the PHP File &#8211; <span class="code">boo.php</span></li>
</ol>
<p><span id="more-218"></span></p>
<h2 align="center">HTML Page</h2>
<p>Our HTML file will contain the javascript as well as the CSS styles embedded within it. We can also create the effect by creating individual files for each i.e one for javascript functions and the other for the CSS. Anyways in this tutorial, both of them will be embedded within the html page. Now First fire up your favourite HTML editor (Personally I love Dreamweaver CS3).</p>
<p>We will be using The jQuery Framework &#8211; <span class="code">jquery.js</span>. If you want to know how the jQuery Framework works then do visit <a href="http://www.visionmasterdesigns.com/blog/2008/07/exploring-javascript-frameworks-jquery-126/">Exploring Javascript Frameworks : jQuery 1.2.6</a>.<br />
<!--adman--></p>
<h4><a name="css"></a>Step 1 &#8211; The CSS</h4>
<p>Lets add our css first. First create a new HTML file, call it <span class="code">interface.html</span>.<br />
The following is the css code.</p>
<pre class="brush: css">
&lt;style type=&quot;text/css&quot;&gt;
body { margin:0 auto 0 auto; color:#000; font-family:Georgia, &quot;Times New Roman&quot;, Times, serif; font-size:16px; background-color:#666666; }

.page { margin:100px auto 0 auto; width:750px;}

/*MENU START*/
#menu  { list-style:none; margin:0px; padding:0px;}

#menu li { list-style:none; display:inline; }
li.active a { background-color:#FFF;color:#000; }

#menu li a,#menu li a:link { float:left; background-color:#3c3c3c; margin-right:5px; padding:7px; color:#FFFFFF; text-decoration:none; width:6em; text-align:center;}
#menu li a:visited { }
#menu li a:hover { background-color:#327cc8 }
#menu li a:active { background-color:#FFF;color:#000; }
/* MENU END*/

#outcontent {clear:both; background-color:#FFFFFF; }
.content {background-color:#FFF; padding:10px; height:300px; margin:0px; }

#loading { clear:both; background:url(wait.gif) center top no-repeat; text-align:center;padding:33px 0px 0px 0px; font-size:12px;display:none; font-family:Verdana, Arial, Helvetica, sans-serif; }
&lt;/style&gt;
</pre>
<p>The CSS is pretty straight forward.</p>
<ul>
<li><span class="code">#page</span> will be assigned to a div, which will hold our menu and other divs
<li><span class="code">#menu</span> is the CSS to display our menu tabs.</li>
<li><span class="code">#loading</span> is the CSS to display the AJAX loading image.</li>
<li><span class="code">#outcontent</span> is the container to contain <span class="code">.content</span></li>
</ul>
<p>Put the above code inside the <span class="code">HEAD</span> tag of <span class="code">interface.html</span>. So <span class="code">interface.html</span> will look something like the following.</p>
<pre class="brush: html">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;title&gt;interface.html&lt;/title&gt;
&lt;style type=&quot;text/css&quot;&gt;
body { margin:0 auto 0 auto; color:#000; font-family:Georgia, &quot;Times New Roman&quot;, Times, serif; font-size:16px; background-color:#666666; }

.page { margin:100px auto 0 auto; width:750px;}

#menu  { list-style:none; margin:0px; padding:0px;}

#menu li { list-style:none; display:inline; }
li.active a { background-color:#FFF;color:#000; }

#menu li a,#menu li a:link { float:left; background-color:#3c3c3c; margin-right:5px; padding:7px; color:#FFFFFF; text-decoration:none; width:6em; text-align:center;}
#menu li a:visited { }
#menu li a:hover { background-color:#327cc8 }
#menu li a:active { background-color:#FFF;color:#000; }

.content {
background-color:#FFF; background:url(ajaxinterface.jpg) bottom right no-repeat; padding:10px; height:300px; margin:0px; }

#loading { clear:both; background:url(wait.gif) center top no-repeat; text-align:center;padding:33px 0px 0px 0px; font-size:12px;display:none; font-family:Verdana, Arial, Helvetica, sans-serif; }

#outcontent {clear:both; background-color:#FFFFFF; }

&lt;/style&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>The above is the HTML page <span class="code">interface.html</span> with the CSS defined in it.</p>
<h4><a name="html"></a>Step 2 &#8211; The HTML</h4>
<p>Ok! Since now we have coded the CSS, lets create the HTML divs inside <span class="code">interface.html</span>.</p>
<ol>
<li>Inside the <span class="code">BODY</span> tag lets create a div which will contain the menu and the subsequent divs.</li>
<pre class="brush: html">
&lt;body&gt;
    &lt;div class=&quot;page&quot;&gt;
    &lt;!-- Menu and other divs go here !--&gt;
    &lt;/div&gt;
&lt;/body&gt;
</pre>
<li>Then we`ll create the menu Tabs.</li>
<pre class="brush: html">
&lt;body&gt;
    &lt;div class=&quot;page&quot;&gt;
    &lt;ul id=&quot;menu&quot;&gt;
    &lt;!-- you can add more tabs as you wish !--&gt;
             &lt;li id=&quot;about&quot;	&gt;&lt;a href=&quot;#&quot; title=&quot;about&quot;&gt;About&lt;/a&gt;&lt;/li&gt;
            &lt;li id=&quot;portfolio&quot;&gt;&lt;a href=&quot;#&quot; title=&quot;portfolio&quot;&gt;Portfolio&lt;/a&gt;&lt;/li&gt;
            &lt;li id=&quot;contact&quot;&gt;&lt;a href=&quot;#&quot; title=&quot;contact&quot;&gt;Contact&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
	&lt;br style=&quot;clear:both;&quot; /&gt;
    &lt;/div&gt;
&lt;/body&gt;
</pre>
<li>Now we need a container to display our <span class="code">Loading</span> text and our <span class="code">content</span>, so we`ll create 2 divs and lets put these divs inside another div called <span class="code">outcontent</span>. The following is how it`ll look.</li>
<pre class="brush: html">
&lt;body&gt;
    &lt;div class=&quot;page&quot;&gt;
        &lt;div&gt;
            &lt;ul id=&quot;menu&quot;&gt;
            &lt;!-- you can add more tabs as you wish !--&gt;
                         &lt;li id=&quot;about&quot;	&gt;&lt;a href=&quot;#&quot; title=&quot;about&quot;&gt;About&lt;/a&gt;&lt;/li&gt;
                        &lt;li id=&quot;portfolio&quot;&gt;&lt;a href=&quot;#&quot; title=&quot;portfolio&quot;&gt;Portfolio&lt;/a&gt;&lt;/li&gt;
                        &lt;li id=&quot;contact&quot;&gt;&lt;a href=&quot;#&quot; title=&quot;contact&quot;&gt;Contact&lt;/a&gt;&lt;/li&gt;
            &lt;/ul&gt;
        &lt;br style=&quot;clear:both;&quot; /&gt;
        &lt;/div&gt;
        &lt;!-- #outcontent - Overall div containing Loading div &amp;amp;amp; content div !--&gt;
        &lt;div id=&quot;outcontent&quot;&gt;
           	 &lt;div id=&quot;loading&quot;&gt;LOADING&lt;/div&gt;
            &lt;div class=&quot;content&quot;&gt;&lt;/div&gt;
        &lt;/div&gt;
        &lt;!-- #outcontent end !--&gt;
    &lt;/div&gt;
&lt;/body&gt;
</pre>
</ol>
<p><span class="code">interface.html</span></p>
<pre class="brush: html">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;title&gt;interface.html&lt;/title&gt;
&lt;style type=&quot;text/css&quot;&gt;
body { margin:0 auto 0 auto; color:#000; font-family:Georgia, &quot;Times New Roman&quot;, Times, serif; font-size:16px; background-color:#666666; }

.page { margin:100px auto 0 auto; width:750px;}

#menu  { list-style:none; margin:0px; padding:0px;}

#menu li { list-style:none; display:inline; }
li.active a { background-color:#FFF;color:#000; }

#menu li a,#menu li a:link { float:left; background-color:#3c3c3c; margin-right:5px; padding:7px; color:#FFFFFF; text-decoration:none; width:6em; text-align:center;}
#menu li a:visited { }
#menu li a:hover { background-color:#327cc8 }
#menu li a:active { background-color:#FFF;color:#000; }

.content {
background-color:#FFF; padding:10px; height:300px; margin:0px; }

#loading { clear:both; background:url(wait.gif) center top no-repeat; text-align:center;padding:33px 0px 0px 0px; font-size:12px;display:none; font-family:Verdana, Arial, Helvetica, sans-serif; }

#outcontent {clear:both; background-color:#FFFFFF; }

&lt;/style&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;div class=&quot;page&quot;&gt;
&lt;div&gt;
&lt;ul id=&quot;menu&quot;&gt;
             &lt;li id=&quot;about&quot;	&gt;&lt;a href=&quot;#&quot; title=&quot;about&quot;&gt;About&lt;/a&gt;&lt;/li&gt;
            &lt;li id=&quot;portfolio&quot;&gt;&lt;a href=&quot;#&quot; title=&quot;portfolio&quot;&gt;Portfolio&lt;/a&gt;&lt;/li&gt;
            &lt;li id=&quot;contact&quot;&gt;&lt;a href=&quot;#&quot; title=&quot;contact&quot;&gt;Contact&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br style=&quot;clear:both;&quot; /&gt;
&lt;/div&gt;
&lt;div id=&quot;outcontent&quot;&gt;
&lt;div id=&quot;loading&quot;&gt;LOADING&lt;/div&gt;
&lt;div class=&quot;content&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>The page should look something like the following</p>
<p style="text-align: center;"><a href="http://www.visionmasterdesigns.com/blog/wp-content/uploads/2008/07/t2.jpg" rel="lightbox[pics218]" title="empty Interface.html"><img src="http://www.visionmasterdesigns.com/blog/wp-content/uploads/2008/07/t2.thumbnail.jpg" alt="empty Interface.html" width="425" height="305" class="attachment wp-att-229 centered" /></a></p>
<h4><a name="javascript"></a>Step 3 &#8211; Add the Javascript Magic !</h4>
<p>This page would do for static pages, but we are making an AJAX powered page ! Its time to add the magic.<br />
First if you have read the <a href="http://www.visionmasterdesigns.com/blog/2008/07/exploring-javascript-frameworks-jquery-126/">Exploring Javascript Frameworks : jQuery 1.2.6</a> post, it should not be a problem.</p>
<ol>
<li>First lets link to the jquery library</li>
<pre class="brush: javascript">
&lt;script src=&quot;jquery.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
</pre>
<li>Next lets open the script tag again and add the following code. The following code is pretty explainatory. I have added a lot of comments to show what each and every line does.</li>
<pre class="brush: javascript">
&lt;script&gt;
  // When the document loads do everything inside here ...
     $(document).ready(function(){
	 $(&#039;.content&#039;).load(&#039;boo.php&#039;);	//by default initally load text from boo.php
         $(&#039;#menu a&#039;).click(function() { //start function when any link is clicked
		 				$(&quot;.content&quot;).slideUp(&quot;slow&quot;);
						 var content_show = $(this).attr(&quot;title&quot;); //retrieve title of link so we can compare with php file
							$.ajax({
							method: &quot;get&quot;,url: &quot;boo.php&quot;,data: &quot;page=&quot;+content_show,
							beforeSend: function(){$(&quot;#loading&quot;).show(&quot;fast&quot;);}, //show loading just when link is clicked
							complete: function(){ $(&quot;#loading&quot;).hide(&quot;fast&quot;);}, //stop showing loading when the process is complete
							success: function(html){ //so, if data is retrieved, store it in html
							$(&quot;.content&quot;).show(&quot;slow&quot;); //animation
							$(&quot;.content&quot;).html(html); //show the html inside .content div
					 }
				 }); //close $.ajax(
         }); //close click(
	 }); //close $(
&lt;/script&gt;
</pre>
</ol>
<p>Voila ! thats it.</p>
<h2><a name="interface"></a>Our Final interface.html page</h2>
<pre class="brush: javascript">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;title&gt;interface.html&lt;/title&gt;
&lt;script src=&quot;jquery.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
 &lt;script&gt;
  // When the document loads do everything inside here ...
     $(document).ready(function(){
	 $(&#039;.content&#039;).load(&#039;boo.php&#039;);	//by default initally load text from boo.php
         $(&#039;#menu a&#039;).click(function() { //start function when any link is clicked
		 				$(&quot;.content&quot;).slideUp(&quot;slow&quot;);
						 var content_show = $(this).attr(&quot;title&quot;); //retrieve title of link so we can compare with php file
							$.ajax({
							method: &quot;get&quot;,url: &quot;boo.php&quot;,data: &quot;page=&quot;+content_show,
							beforeSend: function(){$(&quot;#loading&quot;).show(&quot;fast&quot;);}, //show loading just when link is clicked
							complete: function(){ $(&quot;#loading&quot;).hide(&quot;fast&quot;);}, //stop showing loading when the process is complete
							success: function(html){ //so, if data is retrieved, store it in html
							$(&quot;.content&quot;).show(&quot;slow&quot;); //animation
							$(&quot;.content&quot;).html(html); //show the html inside .content div
					 }
				 }); //close $.ajax(
         }); //close click(
	 }); //close $(
&lt;/script&gt;
&lt;style type=&quot;text/css&quot;&gt;
body { margin:0 auto 0 auto; color:#000; font-family:Georgia, &quot;Times New Roman&quot;, Times, serif; font-size:16px; background-color:#666666; }

.page { margin:100px auto 0 auto; width:750px;}

#menu  { list-style:none; margin:0px; padding:0px;}

#menu li { list-style:none; display:inline; }
li.active a { background-color:#FFF;color:#000; }

#menu li a,#menu li a:link { float:left; background-color:#3c3c3c; margin-right:5px; padding:7px; color:#FFFFFF; text-decoration:none; width:6em; text-align:center;}
#menu li a:visited { }
#menu li a:hover { background-color:#327cc8 }
#menu li a:active { background-color:#FFF;color:#000; }

.content {
background-color:#FFF; padding:10px; height:300px; margin:0px; }

#loading { clear:both; background:url(wait.gif) center top no-repeat; text-align:center;padding:33px 0px 0px 0px; font-size:12px;display:none; font-family:Verdana, Arial, Helvetica, sans-serif; }

#outcontent {clear:both; background-color:#FFFFFF; }

&lt;/style&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;div class=&quot;page&quot;&gt;
&lt;div&gt;
&lt;ul id=&quot;menu&quot;&gt;
             &lt;li id=&quot;about&quot;	&gt;&lt;a href=&quot;#&quot; title=&quot;about&quot;&gt;About&lt;/a&gt;&lt;/li&gt;
            &lt;li id=&quot;portfolio&quot;&gt;&lt;a href=&quot;#&quot; title=&quot;portfolio&quot;&gt;Portfolio&lt;/a&gt;&lt;/li&gt;
            &lt;li id=&quot;contact&quot;&gt;&lt;a href=&quot;#&quot; title=&quot;contact&quot;&gt;Contact&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br style=&quot;clear:both;&quot; /&gt;
&lt;/div&gt;
&lt;div id=&quot;outcontent&quot;&gt;
&lt;div id=&quot;loading&quot;&gt;LOADING&lt;/div&gt;
&lt;div class=&quot;content&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://visionmasterdesigns.com/tutorial-ajax-interface-menu-using-jqueryphp/feed/</wfw:commentRss>
		<slash:comments>89</slash:comments>
		</item>
		<item>
		<title>Tutorial : Using phpMyAdmin to manage mySQL</title>
		<link>http://visionmasterdesigns.com/tutorial-using-phpmyadmin-to-manage-mysql/</link>
		<comments>http://visionmasterdesigns.com/tutorial-using-phpmyadmin-to-manage-mysql/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 17:53:00 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[PHP & MySQL]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PhpMyAdmin]]></category>

		<guid isPermaLink="false">http://blog.visionmasterdesigns.com/?p=175</guid>
		<description><![CDATA[Hello Everyone ! I am really excited ! Its been 18 days since the blog started and the response is amazing. I really hope these tutorials are helpful. Anyways I have seen a lot of people having problem setting up phpmyadmin and Lot more have no idea how to use it. So this tutorial is [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin: 0 0 0.6em 0.6em;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fvisionmasterdesigns.com%2Ftutorial-using-phpmyadmin-to-manage-mysql%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fvisionmasterdesigns.com%2Ftutorial-using-phpmyadmin-to-manage-mysql%2F&amp;source=rowoot&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Hello Everyone !</p>
<p>I am really excited ! Its been 18 days since the blog started and the response is amazing. I really hope these tutorials are helpful. Anyways I have seen a lot of people having problem setting up phpmyadmin and Lot more have no idea how to use it. So this tutorial is dedicated to you folks. I`ll teach you the basics of how to play with phpMyAdmin. Frankly I have not seen much tutorials on how to use phpmyadmin, and I don`t know how well you guys will like it.<br />
Anyways</p>
<h2 style="text-align: center;">phpMyAdmin 2.11.x Front Page</h2>
<p style="text-align: center;"><a title="phpmyadmin front page" rel="lightbox[pics175]" href="http://www.visionmasterdesigns.com/blog/wp-content/uploads/2008/07/t11a.jpg"><img class="attachment wp-att-176 centered" src="http://www.visionmasterdesigns.com/blog/wp-content/uploads/2008/07/t11a.thumbnail.jpg" alt="phpmyadmin front page" width="425" height="251" /></a></p>
<p><span id="more-175"></span><br />
The Front page shows you something similar to the above image. As you can see, On the left we have the existing databases. If there are none available its fine, and on the right we have the page which has a lot of text in it <img src='http://visionmasterdesigns.com/wordpress/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> . You can see that I have marked the area from where you can create your database.<br />
For more information about your mysql server, its configurations etc you can check the many links on this page. Exploring more links is the key to master it <img src='http://visionmasterdesigns.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h4>Lets create a database called &#8216;test&#8217;</h4>
<p>Now lets create a database called test. Put the name test in the Create New database box and click on create.</p>
<p style="text-align: center;"><a title="Create dbase screen using phpmyadmin" rel="lightbox[pics175]" href="http://www.visionmasterdesigns.com/blog/wp-content/uploads/2008/07/t11b.jpg"><img class="attachment wp-att-180 centered" src="http://www.visionmasterdesigns.com/blog/wp-content/uploads/2008/07/t11b.thumbnail.jpg" alt="Create dbase screen using phpmyadmin" width="425" height="250" /></a></p>
<p>You`ll see something similar to the above when you create your first database. Cool ! Now you might notice that I have boxed an area in the above image.</p>
<ul>
<li><span class="code">Structure</span> &#8211; Shows you the structure of the database (Schema)</li>
<li><span class="code">SQL</span> &#8211; You can use the query language to modify your database</li>
<li><span class="code">Search</span> &#8211; Search for a particular item</li>
<li><span class="code">Query</span> &#8211; Right now don`t worry about this much. <img src='http://visionmasterdesigns.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li><span class="code">Export/Import</span> &#8211; You can export your database in SQL or import an equivalent</li>
<li><span class="code">Operations</span> &#8211; Operations you can perform on your database</li>
<li><span class="code">Privileges</span> &#8211; Shows you the user who can use this database and his privileges.</li>
<li><span class="code">Drop</span> &#8211; Delete the database</li>
</ul>
<p>Phew that was quite a bunch ! Lets move on. Now we have created our database test. Lets create tables in it. Click on <span class="code">SQL</span> from the area I had marked in the image, and goto the next step.</p>
<h4>Create table &#8216;user&#8217;</h4>
<p style="text-align: center;"><a title="create table in phpmyadmin" rel="lightbox[pics175]" href="http://www.visionmasterdesigns.com/blog/wp-content/uploads/2008/07/t11c.jpg"><img class="attachment wp-att-181 centered" src="http://www.visionmasterdesigns.com/blog/wp-content/uploads/2008/07/t11c.thumbnail.jpg" alt="create table in phpmyadmin" width="425" height="250" /></a></p>
<p>You will see a page similar to the above image. Write a SQL query to create a table.</p>
<pre lang="sql">CREATE TABLE user (
id INT AUTO_INCREMENT NOT NULL,
user VARCHAR(50),
pass VARCHAR(50),
PRIMARY KEY(id) )</pre>
<p style="text-align: center;"><a title="phpmyadmin table code executed" rel="lightbox[pics175]" href="http://www.visionmasterdesigns.com/blog/wp-content/uploads/2008/07/t11d.jpg"><img class="attachment wp-att-188 centered" src="http://www.visionmasterdesigns.com/blog/wp-content/uploads/2008/07/t11d.thumbnail.jpg" alt="phpmyadmin table code executed" width="425" height="250" /></a></p>
<p>If the code was executed successfully you`ll see something similar to the above image. I think the image is self explainatory. On the left the table you just created under database test. Click on &#8216;test&#8217;. you will be taken to the &#8216;Table Info Page&#8217;.</p>
<h2 style="text-align: center;">phpMyAdmin Database Info page</h2>
<p style="text-align: center;"><a title="phpmyadmin database info page" rel="lightbox[pics175]" href="http://www.visionmasterdesigns.com/blog/wp-content/uploads/2008/07/t11i.jpg"><img class="attachment wp-att-193 centered" src="http://www.visionmasterdesigns.com/blog/wp-content/uploads/2008/07/t11i.thumbnail.jpg" alt="phpmyadmin database info page" width="425" height="251" /></a></p>
<p>This page is where all your tables of a particular database are shown. As shown in the above figure, in the database test, we currently have only 1 table i.e user.</p>
<h2 style="text-align: center;">phpMyAdmin Table Info page</h2>
<p style="text-align: center;"><a title="phpmyadmin table page" rel="lightbox[pics175]" href="http://www.visionmasterdesigns.com/blog/wp-content/uploads/2008/07/t11e.jpg"><img class="attachment wp-att-189 centered" src="http://www.visionmasterdesigns.com/blog/wp-content/uploads/2008/07/t11e.thumbnail.jpg" alt="phpmyadmin table page" width="425" height="250" /></a></p>
<p>Ok ! So you clicked on test and something similar to the above image will be displayed. This page shows you the structure of your table. As you can see, the table we had created has 3 attributes</p>
<ul>
<li><span class="code">id</span> -int (Primary key)</li>
<li><span class="code">user</span> -VARCHAR of size 50</li>
<li><span class="code">pass</span> &#8211; VARCHAR of size 50</li>
</ul>
<p>You can see in the above image, I have marked an area &#8220;edit the attributes&#8221;. Those little icons help to modify your attributes. From the Left -</p>
<ul>
<li><span class="code">Browse</span> &#8211; Browse values of a particular attribute</li>
<li><span class="code">edit &#8211; Edit structure of attribute, (example: change particular attribute&#8217;s datatype from VARCHAR to text)</span></li>
<li><span class="code">delete</span> &#8211; delete particular attribute</li>
<li><span class="code">Primary, Unique, Index</span>. (It is pretty self explainatory, if you know anything about DBMS)</li>
</ul>
<h4>Insert values inside table</h4>
<p>Ok, Now you know how to create a database, create table inside a database. Lets learn how to insert values inside our table. First goto the &#8216;user&#8217; &#8216;table info page&#8217;. then Click on <span class="code">Insert</span> in the top.</p>
<p style="text-align: center;"><a title="insert page phpmyadmin" rel="lightbox[pics175]" href="http://www.visionmasterdesigns.com/blog/wp-content/uploads/2008/07/t11f.jpg"><img class="attachment wp-att-195 centered" src="http://www.visionmasterdesigns.com/blog/wp-content/uploads/2008/07/t11f.thumbnail.jpg" alt="insert page phpmyadmin" width="425" height="250" /></a></p>
<p>You`ll see a page similar to the above image. As you can see, its pretty neatly laid out, I hope its not that tough for you to decide where to type your data <img src='http://visionmasterdesigns.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  *There is no need to type anything in <span class="code">id</span>, since if you notice this line<br />
<span class="code">id INT AUTO_INCREMENT NOT NULL</span> which we had typed earlier to create a table ,you`ll see that <span class="code">id</span> is a primary key &amp; it auto increments as you go on inserting records.*</p>
<p style="text-align: center;"><a title="inserted values" rel="lightbox[pics175]" href="http://www.visionmasterdesigns.com/blog/wp-content/uploads/2008/07/t11g.jpg"><img class="attachment wp-att-197 centered" src="http://www.visionmasterdesigns.com/blog/wp-content/uploads/2008/07/t11g.thumbnail.jpg" alt="inserted values" width="425" height="251" /></a></p>
<p>The above image will be displayed once you have inserted your values successfully. Now since you have inserted values, you can double check or see what all values your table contains by clicking on the <span class="code">Browse</span> link on the top. It`ll browse the table for all the records. The following image is what it`ll look like.</p>
<h2 style="text-align: center;">phpMyAdmin Table browse page</h2>
<p style="text-align: center;"><a title="phpmyadmin browse all records" rel="lightbox[pics175]" href="http://www.visionmasterdesigns.com/blog/wp-content/uploads/2008/07/t11h.jpg"><img class="attachment wp-att-198 centered" src="http://www.visionmasterdesigns.com/blog/wp-content/uploads/2008/07/t11h.thumbnail.jpg" alt="phpmyadmin browse all records" width="425" height="251" /></a></p>
<p>You can see all the values for every record. You can edit, delete the records as well. The small Icons are very obvious and not hard to miss. PhpMyAdmin also gives the ability to see results for particular queries. Suppose you want to execute a query on a particular table then click on SQL on the top of the &#8216;Table Info/Browse Page&#8217;</p>
<h4>Execute SQL queries on your table</h4>
<p style="text-align: center;"><a title="phpmyadmin sql query" rel="lightbox[pics175]" href="http://www.visionmasterdesigns.com/blog/wp-content/uploads/2008/07/t11j.jpg"><img class="attachment wp-att-205 centered" src="http://www.visionmasterdesigns.com/blog/wp-content/uploads/2008/07/t11j.thumbnail.jpg" alt="phpmyadmin sql query" width="425" height="251" /></a></p>
<p>The above page is how it`ll look like, you can type in any query to check.</p>
<p>Well, that was very basics of phpMyAdmin. If you guys want any help regarding other functions of phpmyadmin feel free to ask.</p>
<p>If the response for this tutorial is well, then I`ll move to the advanced phpmyadmin stuffz <img src='http://visionmasterdesigns.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . Enjoy Guys</p>
<div class="donate">Found this tutorial really useful, you can click here to donate.</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input name="cmd" type="hidden" value="_donations" />
<input name="business" type="hidden" value="rowoot@gmail.com" />
<input name="item_name" type="hidden" value="MICHEAL BENEDICT ARUL" />
<input name="no_shipping" type="hidden" value="0" />
<input name="no_note" type="hidden" value="1" />
<input name="currency_code" type="hidden" value="USD" />
<input name="tax" type="hidden" value="0" />
<input name="lc" type="hidden" value="IN" />
<input name="bn" type="hidden" value="PP-DonationsBF" />
<input alt="PayPal - The safer, easier way to pay online!" name="submit" src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif" type="image" /> <img src="https://www.paypal.com/en_US/i/scr/pixel.gif" border="0" alt="" width="1" height="1" /><br />
</form>
<p>else you can click on just any ad <img src='http://visionmasterdesigns.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </div>
]]></content:encoded>
			<wfw:commentRss>http://visionmasterdesigns.com/tutorial-using-phpmyadmin-to-manage-mysql/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Tutorial : Creating a Content Management System using PHP/MySQL</title>
		<link>http://visionmasterdesigns.com/tutorial-creating-a-content-management-system-using-phpmysql/</link>
		<comments>http://visionmasterdesigns.com/tutorial-creating-a-content-management-system-using-phpmysql/#comments</comments>
		<pubDate>Sun, 20 Jul 2008 18:46:07 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[PHP & MySQL]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://blog.visionmasterdesigns.com/?p=103</guid>
		<description><![CDATA[Its been 2 weeks since visionmasterdesigns.com was started and I am very glad with the response. Lot of people want to explore PHP/MySQL more and I think I`ll give in to that . So Today lets design a Content Management System using PHP/MySQL. Index Page 1 : Introduction Page 2 : Database Work Page 3 [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin: 0 0 0.6em 0.6em;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fvisionmasterdesigns.com%2Ftutorial-creating-a-content-management-system-using-phpmysql%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fvisionmasterdesigns.com%2Ftutorial-creating-a-content-management-system-using-phpmysql%2F&amp;source=rowoot&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Its been 2 weeks since visionmasterdesigns.com was started and I am very glad with the response. Lot of people want to explore PHP/MySQL more and I think I`ll give in to that <img src='http://visionmasterdesigns.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . So Today lets design a Content Management System using PHP/MySQL.</p>
<h4>Index</h4>
<ul>
<li>Page 1 : Introduction</li>
<li>Page 2 : <a href="http://www.visionmasterdesigns.com/2008/07/tutorial-creating-a-content-management-system-using-phpmysql/2/">Database Work</a></li>
<li>Page 3 : <a href="http://www.visionmasterdesigns.com/2008/07/tutorial-creating-a-content-management-system-using-phpmysql/3/">functions.php</a></li>
<li>Page 4 : <a href="http://www.visionmasterdesigns.com/2008/07/tutorial-creating-a-content-management-system-using-phpmysql/4/">articlefunctions.php</a></li>
<li>Page 5 : <a href="http://www.visionmasterdesigns.com/2008/07/tutorial-creating-a-content-management-system-using-phpmysql/5/">insertarticle.php</a></li>
<li>Page 6 : <a href="http://www.visionmasterdesigns.com/2008/07/tutorial-creating-a-content-management-system-using-phpmysql/6/">editarticle.php</a></li>
<li>Page 7 : <a href="http://www.visionmasterdesigns.com/2008/07/tutorial-creating-a-content-management-system-using-phpmysql/7/">article.php &#8211; Our start File</a></li>
<li>Demo &#8211; <a href="http://visionmasterdesigns.com/demo/cms/article.php">Here</a></li>
<li>Script &#8211; <a href="http://visionmasterdesigns.com/demo/cms/cms.zip">Here</a></li>
</ul>
<p>Don`t get scared seeing the number of pages. This system has 5 files as listed above. Our CMS features add,edit and delete article records.</p>
<h4>Introduction to CMS</h4>
<p>CMS is an application through which you can add content without the need of uploading any files. You can create,edit,delete articles directly online. These articles are stored in the backend i.e database, in our case MySQL. Everytime user requests for a particular article, the php script retrieves the article and displays it to the user.</p>
<p>I`ll try to keep it as simple as possible.</p>
]]></content:encoded>
			<wfw:commentRss>http://visionmasterdesigns.com/tutorial-creating-a-content-management-system-using-phpmysql/feed/</wfw:commentRss>
		<slash:comments>58</slash:comments>
		</item>
		<item>
		<title>Tutorial : Intoduction to AJAX with PHP</title>
		<link>http://visionmasterdesigns.com/tutorial-introduction-ajax-with-php/</link>
		<comments>http://visionmasterdesigns.com/tutorial-introduction-ajax-with-php/#comments</comments>
		<pubDate>Thu, 17 Jul 2008 10:31:43 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[PHP & MySQL]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://blog.visionmasterdesigns.com/?p=49</guid>
		<description><![CDATA[Hey Everyone, I have been busy lately, but that ain`t gonna stop me from writing tutorials ! Anyways I had promised a Ruby on Rails tutorial, I am working on that, I am trying to make it as descriptive as possible, but before I post that, a lot of people asked me what is AJAX, [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin: 0 0 0.6em 0.6em;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fvisionmasterdesigns.com%2Ftutorial-introduction-ajax-with-php%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fvisionmasterdesigns.com%2Ftutorial-introduction-ajax-with-php%2F&amp;source=rowoot&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Hey Everyone,</p>
<p>I have been busy lately, but that ain`t gonna stop me from writing tutorials ! Anyways I had promised a Ruby on Rails tutorial, I am working on that, I am trying to make it as descriptive as possible, but before I post that, a lot of people asked me what is AJAX, how to integrate it with PHP/MySQL etc ? Well guys, This tutorial is dedicated to you all !</p>
<p>Along with answering all your queries, I will be teaching you how to make a simple application in PHP/MySQL using AJAX.</p>
<h4>Index</h4>
<ul>
<li>Page 1 : <a href="http://www.visionmasterdesigns.com/blog/2008/07/tutorial-introduction-ajax-with-php/">Introduction</a></li>
<li>Page 2 : <a href="http://www.visionmasterdesigns.com/blog/2008/07/tutorial-introduction-ajax-with-php/2/">Introduction  to &#8216;AJAX&#8217;</a></li>
<li>Page 3 : <a href="http://www.visionmasterdesigns.com/blog/2008/07/tutorial-introduction-ajax-with-php/3/">General AJAX code</a></li>
<li>Page 4 : <a href="http://www.visionmasterdesigns.com/blog/2008/07/tutorial-introduction-ajax-with-php/4/">Ajax Application using PHP (Username validator)</a></li>
<li><a target="_blank" href="http://visionmasterdesigns.com/demo/ajax/usernamechecker.html">Click here to see demo</a></li>
</ul>
<p>Required : Some basic knowledge in Javascript, HTML.<br />
<span id="more-49"></span></p>
]]></content:encoded>
			<wfw:commentRss>http://visionmasterdesigns.com/tutorial-introduction-ajax-with-php/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
