<?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>Naumow Blog</title>
	<atom:link href="http://blog.naumow.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.naumow.com</link>
	<description>Tutorials, News and much more</description>
	<lastBuildDate>Wed, 14 Apr 2010 03:02:01 +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>Scrolling a movieclip to mask or unmask another movieclip in flash with AS2</title>
		<link>http://blog.naumow.com/flash/scrolling-a-mask-with-as2.html</link>
		<comments>http://blog.naumow.com/flash/scrolling-a-mask-with-as2.html#comments</comments>
		<pubDate>Mon, 30 Nov 2009 19:48:22 +0000</pubDate>
		<dc:creator>Fenawa</dc:creator>
				<category><![CDATA[all]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://blog.naumow.com/?p=19</guid>
		<description><![CDATA[A nice way to scroll a mask with AS2 but with a few tricks and a super easy code. You can download the file and check it for yourself. :)]]></description>
			<content:encoded><![CDATA[<p>In this post I will show you how to scroll a mask with AS in just a few simple steps and with a few lines of code.<br />
I wrote this piece of code when working on <a href="http://works.naumow.com/oc" target="_blank">works.naumow.com/oc</a>. </p>
<p>There&#8217;s nothing misterious here. In fact maybe this is something you&#8217;ve already seen before but couldn&#8217;t tell how it was done. Well, here it is.</p>
<p><strong>Initial Vars:</strong><br />
<code><span class="colorBlue">var</span> left:<span class="colorBlue">Number</span> = 200;<span class="colorCCC">//SCROLLER X INI POS</span><br />
<span class="colorBlue">var</span> right:<span class="colorBlue">Number</span> = 345;<span class="colorCCC">//SCROLLER X END POS</span><br />
<span class="colorBlue">var</span> scrollerDistance:<span class="colorBlue">Number</span> = 145;<span class="colorCCC">//DIFF BETWEEN LEFT AND RIGHT : 200 + 200 - 55</span></code></p>
<p><object width="600" height="50"><param name="movie" value="http://blog.naumow.com/tutorials/motion/flash/scroll_mask/main.swf"></param><param name="quality" value="high"></param><param name="wmode" value="window"></param><param name="menu" value="false"></param><param name="bgcolor" value="#FFFFFF"></param>
<embed type="application/x-shockwave-flash" width="600" height="50" src="http://blog.naumow.com/tutorials/motion/flash/scroll_mask/main.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed></object></p>
<h3><strong>Horizontal mask movement:</strong></h3>
<p><strong>Scrolling value applied to mask:</strong><br />
<code><span class="colorCCC">//((SCROLLER X POSITION - SCROLLER INITIAL POSITION) / HOW MUCH DISTANCE)*MASKED MC WIDTH</span><br />
maskPosVal = ((scroller1_mc.<span class="colorBlue">_x</span>-left)/scrollerDistance)*600;</code></p>
<p><strong>Application:</strong><br />
<code><span class="colorCCC">//STRAIGHT MOVEMENT</span><br />
mask1_mc.<span class="colorBlue">_x</span> = maskPosVal; </code></p>
<p><strong>or</strong></p>
<p><code><span class="colorCCC">//EASING</span><br />
xVal = mask1_mc.<span class="colorBlue">_x</span>;<br />
xDiff = maskPosVal-xVal;<br />
xMove = xDiff/3;<br />
mask1_mc.<span class="colorBlue">_x</span> = xVal+xMove;<br />
</code></p>
<p><object width="600" height="50"><param name="movie" value="http://blog.naumow.com/tutorials/motion/flash/scroll_mask/main2.swf"></param><param name="quality" value="high"></param><param name="wmode" value="window"></param><param name="menu" value="false"></param><param name="bgcolor" value="#FFFFFF"></param>
<embed type="application/x-shockwave-flash" width="600" height="50" src="http://blog.naumow.com/tutorials/motion/flash/scroll_mask/main2.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed></object></p>
<h3><strong>Vertical mask movement:</strong></h3>
<p>Scroller values are the same, we just need to change the mask movement property, from <code>_x to _y</code>, we also need to change the width value for height value in our formula (*50 in this case), and last, rearrange the masks within the archive.</p>
<p><strong>Scrolling value applied to mask:</strong><br />
<code><span class="colorCCC">//((SCROLLER X POSITION - SCROLLER INITIAL POSITION) / HOW MUCH DISTANCE)*MASKED MC HEIGHT</span><br />
maskPosVal = ((scroller1_mc.<span class="colorBlue">_x</span>-left)/scrollerDistance)*50;</code></p>
<p><strong>Application:</strong><br />
<code><span class="colorCCC">//STRAIGHT MOVEMENT</span><br />
mask1_mc.<span class="colorBlue">_y</span> = maskPosVal; </code></p>
<p><strong>or</strong></p>
<p><code><span class="colorCCC">//EASING EFFECT</span><br />
yVal = mask1_mc.<span class="colorBlue">_y</span>;<br />
yDiff = maskPosVal-yVal;<br />
yMove = yDiff/3;<br />
mask1_mc.<span class="colorBlue">_y</span> = yVal+xMove;</code></p>
<blockquote><p><strong>Tip:</strong> When you calculate the right pos, remember to take into account the size of the scroller as well. For example, in my case, the registration point of the scroller mc is on the left, and the scroller width size is 55px. So the right value in this case would be 200 (left pos) + 200 (size of white line) &#8211; 55 (the size of the scroller) = 345.</p>
</blockquote>
<p><a href="http://blog.naumow.com/tutorials/motion/flash/scroll_mask/scroll_mask.zip"><br />
Download the zip file.</a> The code is fully commented plus is very easy to understand. If you have any question or comment, you are welcome to post it.</p>
<p><strong class="colorOrange1">Suggestion:</strong> If you want to learn how to master a soft or script language, my suggestion is that you have to read&#8230;. then keep reading&#8230; and read even more. Don&#8217;t get used to copy / paste. It might solve the inmediate problem but you will never know what you are actually doing.</p>
<p><strong class="colorOrange1">Good Luck!</strong><br />
Federico :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.naumow.com/flash/scrolling-a-mask-with-as2.html/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Multi-language wordpress with the help of qTranslate plugin and poEdit</title>
		<link>http://blog.naumow.com/all/multilanguage-wordpress.html</link>
		<comments>http://blog.naumow.com/all/multilanguage-wordpress.html#comments</comments>
		<pubDate>Thu, 13 Aug 2009 00:26:49 +0000</pubDate>
		<dc:creator>Fenawa</dc:creator>
				<category><![CDATA[all]]></category>
		<category><![CDATA[wp]]></category>

		<guid isPermaLink="false">http://blog.naumow.com/?p=1</guid>
		<description><![CDATA[How to customize the content of your wordpress site in different languages, thanks to qTranslate plugin and the use of GetText() ( _e() y __() ).]]></description>
			<content:encoded><![CDATA[<p>In this tutorial I will explain how to configure wordpress to have our content translated into several languages in a relatively simple and efficient way. The idea is not just translating the content loaded by the CMS, but any other that&#8217;s in our template.</p>
<p>This tutorial consists of several stages. In this first stage I&#8217;m going to talk about qTranslate which is the plugin I used to switch the content based on the selected language.</p>
<p>In the second stage I&#8217;m going to talk about how to translate everything that is in our template but is not coming from the wordpress editor. For that we are going to use GetText () (_e () and __ ()), and poEdit to generate .po and .mo files that contain our translations.</p>
<p>In the final stage I&#8217;m going to talk about the <a href="http://wordpress.org/extend/plugins/all-in-one-seo-pack/" target="_blank">All In One SEO</a> plugin, which is very useful for defining metatags, keywords and descriptions, not only for our home page but also on all of our individual pages and posts. Why do I include it here? Because with the use of a special qtranslate tag, we can also define metatags, keywords and descriptions in different languages as well.</p>
<p><strong>qTranslate:</strong><br />
I want to clarify that qTranslate plugin makes no translation by itself, but allows us to write the post in different languages and display them depending on the language chosen by the user, as well as configure it to recognize automatically the browser&#8217;s language settings and display the content accordingly.</p>
<p><a rel="milkbox[appserv]" href="http://blog.naumow.com/images/tutorials/cms-language1.gif"><img class="aligncenter size-medium wp-image-613" title="qTranslate Settings Page" src="http://blog.naumow.com/images/tutorials/cms-language1-300x225.gif" alt="qTranslate Settings Page" width="300" height="225" /></a>  <a rel="milkbox[appserv]" href="http://blog.naumow.com/images/tutorials/cms-language.gif"><img class="aligncenter size-medium wp-image-612" title="Wordpress Editor" src="http://blog.naumow.com/images/tutorials/cms-language-300x141.gif" alt="Wordpress Editor" width="300" height="141" /></a></p>
<p>As you can see in the second image, once configured, we can post our article (title and content) in all the different languages we defined in the settings page. In my case, I have English and Spanish. What it&#8217;s not possible to customize (at least I couldn&#8217;t find out yet) is the permalink url. This is because, although we have content in different languages, it&#8217;s still one single post.</p>
<p>The installation is really simple, just like any other plugin. <a href="http://www.qianqin.de/qtranslate/download/" target="_blank">Download</a> the files in the plugin folder. Then login to wordpress, go to plugin section and activate qTranslate. Finally go to settings -> Languages and select your choices.</p>
<p>We have just a few options here which are really easy to understand. If you need further information, please visit <a href="http://www.qianqin.de/qtranslate/forum/viewforum.php?f=3&amp;sid=0f3bd76024ad13bbe8e43e422ccc4e77" target="_blank">qTranslate</a> forum.</p>
<p>In my case, I set it to work like: siteurl/lan/pages.</p>
<p><strong>To include the language selector in our theme, we use this code:</strong></p>
<p><code><span class="colorOrange1">&lt;?php</span> <span class="colorBlue">echo</span> qtrans_generateLanguageSelectCode($arg); <span class="colorOrange1">?&gt;</span></code></p>
<p>The params for $arg can be: <code>'image', 'text', 'both', 'dropdown'</code>. Meaning, you change $arg with one of them.</p>
<p><strong>This is how qTranslate works:</strong><br />
When we save our post, although everything is saved together, the content of each tab is enclosed with a special tag that defines the content language. Like for example the spanish tag which is <code><span class="colorCCC">&lt;!--:es-- &gt;</span></code> y <code><span class="colorCCC">&lt;!--:-- &gt;</span></code>. If you have access to the wordpress database, check wp_posts table and its data. You will see that each block of text starts and ends with the corresponding language tag. So based on the selected language, only the text within that tag will be displayed.</p>
<p>There is also a function that returns the selected language abbreviation. This function is <code><span class="colorOrange1">&lt;?php</span> <span class="colorBlue">echo</span> qtrans_getLanguage(); <span class="colorOrange1">?&gt;</span></code>. It&#8217;s very useful if we want to display a specific image based on the active language. The path to the image would be something like this:</p>
<p><code><span class="colorViolet">&lt;img src=</span><span class="colorBlue">"path/name_</span><span class="colorOrange1">'&lt;?php</span> <span class="colorBlue">echo</span> qtrans_getLanguage(); <span class="colorOrange1">?&gt;'</span><span class="colorBlue">.gif"</span><span class="colorViolet"> /&gt;</span></code></p>
<blockquote><p><strong>Tip:</strong> If you created the navigation menu by hand and not by <code><span class="colorOrange1">&lt;?php</span> wp_list_pages(); <span class="colorOrange1">?&gt;</span></code>, you will have to use absolute url&#8217;s. Like this:</p>
<p><code><span class="colorGreen">&lt;a href=</span><span class="colorBlue">"</span><span class="colorOrange1">'&lt;?php </span>bloginfo(<span class="colorOrange1">'siteurl'</span>); <span class="colorOrange1">?&gt;'</span><span class="colorBlue">"mypage"</span><span class="colorGreen">&gt;</span>Page<span class="colorGreen">&lt;/a&gt;</span></code></p>
<p>where <code><span class="colorOrange1">&lt;?php </span>bloginfo(<span class="colorOrange1">'siteurl'</span>); <span class="colorOrange1">?&gt;</span> </code>will return site url + active language abbreviation. Notice that I didn&#8217;t include the inverted slash &#8220;/&#8221; in front of mypage. That&#8217;s because <code>"siteurl"</code> already returns siteurl/lan/.</p></blockquote>
<p>This concludes the first part of the tutorial. In brief I&#8217;m going to post the 2nd part and see how to use the functions GetText () to translate text strings.</p>
<p><strong class="colorOrange1">Suggestion:</strong> If you want to learn how to master a soft or script language, my suggestion is that you have to read&#8230;. then keep reading&#8230; and read even more. Don&#8217;t get used to copy / paste. It might solve the inmediate problem but you will never know what you are actually doing.</p>
<p><strong class="colorOrange1">Good Luck!</strong><br />
Federico :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.naumow.com/all/multilanguage-wordpress.html/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Install AppServ &#8211; PHP, Apache, MySQL</title>
		<link>http://blog.naumow.com/php/install-appserv.html</link>
		<comments>http://blog.naumow.com/php/install-appserv.html#comments</comments>
		<pubDate>Thu, 13 Aug 2009 00:25:22 +0000</pubDate>
		<dc:creator>Fenawa</dc:creator>
				<category><![CDATA[all]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.naumow.com/?p=11</guid>
		<description><![CDATA[It's and OpenSource solution for windows platform to install Apache, MySQL and PHP all in one package and with just a few clicks, since all the process runs automatically and without too much user interaction.]]></description>
			<content:encoded><![CDATA[<p><strong>AppServ</strong> is an OpenSource solution that comes with Apache, PHP and MySQL, all in one package, and very easy to install. The interesting thing about it, is that it runs on windows platform and it&#8217;s really useful to those (like me) that are not used to linux platform or to work from a console.</p>
<p><a style="float:left; padding-right:20px;" rel="milkbox[appserv]" href="http://blog.naumow.com/images/tutorials/appserv_screen.jpg"><img class="aligncenter size-medium wp-image-318" title="appserv_screen" src="http://blog.naumow.com/images/tutorials/appserv_screen-300x234.jpg" alt="appserv_screen" width="300" height="234" /></a></p>
<p><a style="float:left;" rel="milkbox[appserv]" href="http://blog.naumow.com/images/tutorials/appserv_phpMyAdmin.jpg"><img class="aligncenter size-medium wp-image-317" title="appserv_phpMyAdmin" src="http://blog.naumow.com/images/tutorials/appserv_phpMyAdmin-300x140.jpg" alt="appserv_phpMyAdmin" width="300" height="140" /></a></p>
<div class="clear" style="height: 20px;"><img style="border:0" src="http://blog.naumow.com/images/tutorials/spacer.gif" alt="" /></div>
<p>If you are looking for a home server, easy to install and easy to customize, AppServ works like magic. The wizard is really easy to follow, and you can even install it in your own pc along with the rest of your stuff.</p>
<p>Here it is the link to <a class="php" href="http://appserv.uptodown.com/" target="_blank">download it</a> plus a <a class="php" href="http://www.appservnetwork.com/modules.php?name=Content&amp;pa=showpage&amp;pid=8" target="_blank">step by step to install it</a>.</p>
<p>One thing that you need to know if you want to have your own server, is the type of service you have with your ISP. That is, with a static IP or dynamic IP.</p>
<p><strong>Static IP:</strong> A static IP address is simply a permanent address that remains associated with a single computer over an extended period of time and it&#8217;s assigned by your ISP. This type of IP let&#8217;s you run web servers, mail servers, FTP, etc&#8230; and redirect a domain to that IP without having to refresh DNS each time the IP changes, like with a dynamic IP.</p>
<p><strong>Dynamic IP:</strong> A dynamic IP is assigned by a DHCP server at the start of each session, normally changing from one session to the next. If you have a DSL connection, the assigned IP doesn&#8217;t change really often but it&#8217;s not permanent so if you want to run a server and manage your own domain, you need a service (like <a href="http://www.cdmon.com" target="_blank">www.cdmon.com</a>) that refreshes DNS each time your IP changes.</p>
<p><strong class="colorOrange1">Suggestion:</strong> If you want to learn how to master a soft or script language, my suggestion is that you have to read&#8230;. then keep reading&#8230; and read even more. Don&#8217;t get used to copy / paste. It might solve the inmediate problem but you will never know what you are actually doing.</p>
<p><strong class="colorOrange1">Good Luck!</strong><br />
Federico :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.naumow.com/php/install-appserv.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create a database with phpMyAdmin</title>
		<link>http://blog.naumow.com/php/create-a-database-with-phpmyadmin.html</link>
		<comments>http://blog.naumow.com/php/create-a-database-with-phpmyadmin.html#comments</comments>
		<pubDate>Thu, 13 Aug 2009 00:15:29 +0000</pubDate>
		<dc:creator>Fenawa</dc:creator>
				<category><![CDATA[all]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.naumow.com/?p=13</guid>
		<description><![CDATA[How to create a database with phpmyadmin, a free software tool written in PHP intended to handle the administration of MySQL via a web interface.]]></description>
			<content:encoded><![CDATA[<p>I will try to explain as simple as possible the steps to create a DB, then create a table to hold the data, and finally to connect to the DB to request the data and print that data in a web page. For a better understanding you should have basic knowledge of PHP.<span id="more-13"></span></p>
<p>Our DB is going to hold a list of contacts and the fields will be name and email address.</p>
<p>We are going to do the DB creation process through <a href="http://www.phpmyadmin.net/home_page/index.php" target="_blank" class="php">phpMyAdmin</a> which is an open source tool written in PHP intended to handle the administration of MySQL over the World Wide Web. It can perform various tasks such as creating, modifying or deleting databases, tables, fields or rows; executing SQL statements; or managing users and permissions. If you have a hosting plan, you should be able to access phpMyAdmin through the cpanel. In case you don&#8217;t, check with your ISP.</p>
<p>Those that would like to have their own server, take a look at <a href="http://blog.naumow.com/php/install-appserv.html" target="_blank">How to install AppServ</a></p>
<p>Next&#8230; Assuming you already got into phpMyAdmin panel, what you see is something like this:</p>
<p><a href="http://blog.naumow.com/images/tutorials/simple_db_screen.gif" rel="milkbox[db]"><img src="http://blog.naumow.com/images/tutorials/simple_db_screen-300x116.gif" alt="simple_db_screen" title="simple_db_screen" width="300" height="116" border="0" class="aligncenter size-medium wp-image-307" /></a></p>
<p>In my case I have all set in English. But you can change the language choosing it from the <strong>language</strong> drop down menu.</p>
<p>To create the DB, we go to the textbox <strong>Create new database</strong>, we type a name, and then click <strong>create</strong>.</p>
<blockquote><p><strong>Tip:</strong> Try to choose a name that tells you something about the project so when you have a few more tables there, you can easily distinguish them.</p></blockquote>
<p>In my example, I just named it test_1. So test_1 is our DB. Now we need to create a table to save the data. To do this, go to <strong>Create new table on database test_1</strong> and give it a name.</p>
<p><a href="http://blog.naumow.com/images/tutorials/simple_db_create_table.gif" rel="milkbox[db]"><img src="http://blog.naumow.com/images/tutorials/simple_db_create_table-300x144.gif" alt="simple_db_create_table" title="simple_db_create_table" width="300" height="144" class="aligncenter size-medium wp-image-315" border="0" /></a></p>
<p>We&#8217;ll call it <strong>contact</strong> and in &#8220;number of fields&#8221; we put 3. Then click <strong>go</strong>. Number of fields is the amount of cells our table will have. In our example, we have 3 cells. One for the ID to be automatically assigned to each new record, a second one to save contact name, and last one to save email account.</p>
<blockquote><p>
<strong>Tip:</strong> It is strongly recommended that you never use special characters like á-é-í-ó-ú, ( , ), ñ, [], etc, for the table or field names. I found these rules somewhere:</p>
<p>* No identifier can contain ASCII NUL (0&#215;00) or a byte with a value of 255.<br />
* Database, table, and column names should not end with space characters.<br />
* Database and table names cannot contain “/”, “\”, “.”, or characters that are not allowed in file names.</p></blockquote>
<p>Now that we have the table, we set the <strong>Field</strong>, <strong>Type</strong> and <strong>Length</strong>. I&#8217;m not going to explain the Type and Length various options since it&#8217;s beyond this tutorial. If you want to dig a little bit about it, please check <a href="http://www.htmlite.com/mysql003.php" target="_blank" class="php">MySQL datatypes.</a> You can check the image below and do the same. And in the case of the ID, remember to select &#8220;auto_increment&#8221; in the <strong>extra</strong> field option, and choose &#8220;primary key&#8221; from the radio buttons.</p>
<p><a href="http://blog.naumow.com/images/tutorials/simple_db_create_fields.gif" rel="milkbox[db]"><img src="http://blog.naumow.com/images/tutorials/simple_db_create_fields-300x94.gif" alt="simple_db_create_fields" title="simple_db_create_fields" width="300" height="94" class="aligncenter size-medium wp-image-314" border="0" /></a></p>
<p>Click <strong>Save</strong> to complete the table creation process. Now we are going to enter the data for <strong>name</strong> and <strong>email</strong>. To do that, click <strong>insert</strong> on top of menu options. When done, click <strong>go</strong>. We now have our first <strong>&#8220;record&#8221;</strong> done. If you would like to enter a new record, repeat the process.</p>
<p><a href="http://blog.naumow.com/images/tutorials/simple_db_insert_data.gif" rel="milkbox[db]"><img src="http://blog.naumow.com/images/tutorials/simple_db_insert_data-300x127.gif" alt="simple_db_insert_data" title="simple_db_insert_data" width="300" height="127" class="aligncenter size-medium wp-image-316" border="0" /></a></p>
<p>So, we are ready to move on. To sum it up, we created a DB, we created a table with records and assigned data to those records. Now we just need to connect to the DB, do a query to request the data and show everything in a web page.</p>
<p>How we do that? With PHP. But first you need to confirm that you have PHP enabled in your hosting or wherever you are testing this. To do so, open your HTML editor, paste the code below, save it as .php in the root of your server.</p>
<p><code><span class="colorOrange1">&lt;?php phpinfo(); ?&gt;</span></code></p>
<p>Then open this same page in a browser. If PHP is enabled you will see all the information related to PHP, MySQL, etc. Once you confirm it, please don&#8217;t forget to delete the page. In case the page didn&#8217;t return any information (assuming you are accessing the page but nothing showed up) you will have to check with your hosting. </p>
<p>Assuming that PHP is enabled, create a new folder, a new php page and paste the code below. I&#8217;m going to explain it a little bit although it&#8217;s quite simple.</p>
<p><code><br />
<span class="colorOrange1">&lt;?php</span><br />
$db_host = <span class="colorOrange1">"localhost"</span>;<br />
$db_database = <span class="colorOrange1">"test_1"</span>; <span class="colorOrange2">// DB Name</span><br />
$db_username = <span class="colorOrange1">""</span>;       <span class="colorOrange2">// Username to access MySQL server. Username and password should be provided by your hosting or if you have your own server, when you installed MySQL.</span><br />
$db_password = <span class="colorOrange1">""</span>;       <span class="colorOrange2">// Password</span><br />
</code><br />
<code><br />
<span class="colorOrange2">// Here we establish the connection with MySQL server</span><br />
$db_connect = <span class="colorBlue">mysql_connect</span>($db_host, $db_username, $db_password) <span class="colorBlue">or die</span> (<span class="colorOrange1">\'Error connecting to mysql\'</span>);<br />
</code><br />
<code><br />
<span class="colorOrange2">// We define which table we want to connect with</span><br />
$db_select_db =<span class="colorBlue"> mysql_select_db</span>($db_database);<br />
</code><br />
<code><br />
<span class="colorOrange2">// Basically it means: Select everything from table contact order by name in descending order</span><br />
$query=<span class="colorOrange1">"SELECT * FROM contact ORDER BY name DESC"</span>;<br />
</code><br />
<code><br />
<span class="colorOrange2">// Save the query resutls in $result var</span><br />
$result = <span class="colorBlue">mysql_query</span>($query) <span class="colorBlue">or die</span>(<span class="colorOrange1">\'Error : \' . mysql_error()</span>);<br />
</code><br />
<code><br />
<span class="colorOrange2">// Use a while to loop through all of the records we have in the DB.<br />
// With mysql_fetch_assoc we are getting the data in associative array format instead of indexing format.<br />
// This way we can access the result using the name of the field</span><br />
<span style="color:green">while</span> ($data=<span class="colorBlue">mysql_fetch_assoc</span>($result)) {<br />
<span class="colorOrange2">// Finally, we create divs to hold and show the result</span><br />
<span class="colorBlue">echo</span> <span class="colorOrange1">"&lt;div style=\'float:left; width:300px;\'&gt;"</span>.$data[<span class="colorOrange1">\'name\'</span>].<span class="colorOrange1">"&lt;/div&gt;"</span>;<br />
<span class="colorBlue">echo</span> <span class="colorOrange1">"&lt;div style=\'float:left;\'&gt;"</span>.$data[<span class="colorOrange1">\'email\'</span>].<span class="colorOrange1">"&lt;/div&gt;"</span>;<br />
<span class="colorBlue">echo</span> <span class="colorOrange1">"&lt;div style=\'clear:both;\'&gt;&lt;/div&gt;"</span>;<br />
};<br />
<span class="colorOrange1">?&gt;</span><br />
</code><br />
If you followed the steps correctly, you should be able to see the contacts list. If not, check your DB to see if you entered the data. If you still have problems, send me an <a href="http://www.naumow.com/#contactme" target="_self" class="php">email</a> and I&#8217;ll see what I can do to help you. </p>
<p><strong class="colorOrange1">Suggestion:</strong> If you want to learn how to master a soft or script language, my suggestion is that you have to read&#8230;. then keep reading&#8230; and read even more. Don&#8217;t get used to copy / paste. It might solve the inmediate problem but you will never know what you are actually doing.</p>
<p><strong class="colorOrange1">Good Luck!</strong><br />
Federico :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.naumow.com/php/create-a-database-with-phpmyadmin.html/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Communication between flash, php and MySQL</title>
		<link>http://blog.naumow.com/flash/communication-between-flash-php-and-mysql.html</link>
		<comments>http://blog.naumow.com/flash/communication-between-flash-php-and-mysql.html#comments</comments>
		<pubDate>Thu, 13 Aug 2009 00:13:32 +0000</pubDate>
		<dc:creator>Fenawa</dc:creator>
				<category><![CDATA[all]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://blog.naumow.com/tutorials/motion/communication-between-flash-php-and-mysql</guid>
		<description><![CDATA[How to combine Flash, PHP and MySQL to create an online contact book. PHP will serve to communicate between Flash and MySQL.]]></description>
			<content:encoded><![CDATA[<p>In this tutorial I&#8217;ll show you how to create a simple contact book using Flash as the gui, PHP to do the process and communicate with db and MySQL to save the records.</p>
<p>This is a very easy tutorial, although I would recommend you to have basic knowledge of AS, PHP and how to connect to a DB. If you don&#8217;t know how to create a DB, I suggest you to check <a href="http://blog.naumow.com/php/create-a-database-with-phpmyadmin.html" target="_blank">How to create a Database.</a></p>
<p>If you want to test this app locally (your pc), you&#8217;ll need to have a server installed with PHP and SQL running. If you are on windows platform and would like to have your own server, please check <a href="http://www.appservnetwork.com/" target="_blank">AppServ.</a> Here you have a direct link to <a href="http://sourceforge.net/projects/appserv/files/" target="_blank">download AppServ</a>. And here a step by step <a href="http://www.appservnetwork.com/modules.php?name=Content&#038;pa=showpage&#038;pid=8" target="_blank">how to configure AppServ</a>.</p>
<p><object width="507" height="220"><param name="movie" value="http://blog.naumow.com/tutorials/motion/flash/db/db_1/list.swf"></param><param name="quality" value="high"></param><param name="wmode" value="window"></param><param name="menu" value="false"></param><param name="bgcolor" value="#FFFFFF"></param><param name="flashvars" value=" urlPath=http://blog.naumow.com/tutorials/motion/flash/db/db_1/"></param>
<embed type="application/x-shockwave-flash" width="507" height="220" src="http://blog.naumow.com/tutorials/motion/flash/db/db_1/list.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" flashvars=" urlPath=http://blog.naumow.com/tutorials/motion/flash/db/db_1/" ></embed></object></p>
<p><a href="http://blog.naumow.com/tutorials/motion/flash/db/db_1/files.zip">Download Files</a></p>
<p><strong class="colorOrange1">Suggestion:</strong> If you want to learn how to master a soft or script language, my suggestion is that you have to read&#8230;. then keep reading&#8230; and read even more. Don&#8217;t get used to copy / paste. It might solve the inmediate problem but you will never know what you are actually doing.</p>
<p><strong class="colorOrange1">Good Luck!</strong><br />
Federico :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.naumow.com/flash/communication-between-flash-php-and-mysql.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
