<?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>PHP-Princess.net &#187; PHP</title>
	<atom:link href="http://php-princess.net/category/scriptworld/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://php-princess.net</link>
	<description></description>
	<lastBuildDate>Thu, 29 Mar 2012 15:50:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<script type="text/javascript">
if (typeof Meebo == "undefined") {
Meebo=function(){(Meebo._=Meebo._||[]).push(arguments)};
(function(q){

	var args = arguments;
	if (!document.body) { return setTimeout(function(){ args.callee.apply(this, args) }, 100); }
	var d=document, b=d.body, m=b.insertBefore(d.createElement('div'), b.firstChild); s=d.createElement('script');
	m.id='meebo'; m.style.display='none'; m.innerHTML='<iframe id="meebo-iframe"></iframe>';
	s.src='http'+(q.https?'s':'')+'://'+(q.stage?'stage-':'')+'cim.meebo.com/cim/cim.php?network='+q.network;
	b.insertBefore(s, b.firstChild);

})({network:'phpprincessnet_ba02xu'});	}</script>	<item>
		<title>if $IE</title>
		<link>http://php-princess.net/2009/07/11/if-ie/</link>
		<comments>http://php-princess.net/2009/07/11/if-ie/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 00:01:24 +0000</pubDate>
		<dc:creator>daynah</dc:creator>
				<category><![CDATA[Geek Fun & Humor]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[humor]]></category>

		<guid isPermaLink="false">http://php-princess.net/?p=1410</guid>
		<description><![CDATA[I was working on a web project and I usually start with Firefox to test things. Then Safari, Chrome, and then IE. By the time I got to IE, I noticed that my hard work was just not viewable. Argh. So I tweeted out: function browserCh() { $a = $_SERVER['HTTP_USER_AGENT']; $IE = ((eregi("MSIE",$a) &#124;&#124; eregi("Microsoft",$a)))==1; [...]]]></description>
			<content:encoded><![CDATA[<p>I was working on a web project and I usually start with Firefox to test things. Then Safari, Chrome, and then IE. By the time I got to IE, I noticed that my hard work was just not viewable. Argh. So <a href="http://twitter.com/daynah/status/2540885144">I tweeted</a> out:</p>
<p><img src="http://php-princess.net/wp-content/uploads/tweet-browsercheck.jpg" alt="tweet-browsercheck" title="tweet-browsercheck" class="aligncenter size-full wp-image-1414" /></p>
<pre class="brush:php">function browserCh()
{
     $a = $_SERVER['HTTP_USER_AGENT'];
     $IE = ((eregi("MSIE",$a) || eregi("Microsoft",$a)))==1; 

     if($IE)
        return 'Bad Browser!';
}
</pre>
<p>I got a laugh at some of the responses.. :)</p>
<blockquote><p>
@<a href="http://twitter.com/honging/status/2542162987">honging</a> : daynah, i prefer: <code>&lt;style type="text/css"&gt;* html body { display: none; }&lt;/style&gt;</code> ;)</p>
<p>@<a href="http://twitter.com/j_holtslander">j_holtslander</a>: @daynah that was kinda hot. LOL.  </p>
<p>@<a href="http://twitter.com/robflynn43/statuses/2542559459">robflynn43</a>: @daynah Haha, browserCh() made me happy. You win a high five, redeemable any time you see me. =)  </p>
<p>@<a href="http://twitter.com/ialexs/status/2542305561">ialexs</a>@daynah  :D (re: bad browser)</p></blockquote>
<p><map name='google_ad_map_1410_5ca5e442dc272ca0'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/1410?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_1410_5ca5e442dc272ca0' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=1410&amp;url= http%3A%2F%2Fphp-princess.net%2F2009%2F07%2F11%2Fif-ie%2F' /></p><div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fphp-princess.net%2F2009%2F07%2F11%2Fif-ie%2F&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><img style='display:none' id="post-1410-blankimage" onload="Meebo('discoverSharable', {element: ((this.parentNode.className.match('post')) ? this.parentNode : this.parentNode.parentNode) ,url:'http://php-princess.net/2009/07/11/if-ie/',title:'if $IE',tweet:'I was working on a web project and I usually start with Firefox to test things. Then Safari, Chrome,',description:'I was working on a web project and I usually start with Firefox to test things. Then Safari, Chrome,'})"><script type='text/javascript'>document.getElementById("post-1410-blankimage").onload();</script><img src="http://php-princess.net/?ak_action=api_record_view&id=1410&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://php-princess.net/2009/07/11/if-ie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>To Ruby From PHP</title>
		<link>http://php-princess.net/2007/02/21/to-ruby-from-php/</link>
		<comments>http://php-princess.net/2007/02/21/to-ruby-from-php/#comments</comments>
		<pubDate>Thu, 22 Feb 2007 06:58:09 +0000</pubDate>
		<dc:creator>daynah</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://php-princess.net/2007/02/21/to-ruby-from-php/</guid>
		<description><![CDATA[If you&#8217;re interested in learning Ruby, here is a list of all the simlarities and differences between Ruby and PHP.]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re interested in learning Ruby, <a href="http://www.ruby-lang.org/en/documentation/ruby-from-other-languages/to-ruby-from-php/">here is a list of all the simlarities and differences</a> between Ruby and PHP.</p>
<p><map name='google_ad_map_421_5ca5e442dc272ca0'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/421?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_421_5ca5e442dc272ca0' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=421&amp;url= http%3A%2F%2Fphp-princess.net%2F2007%2F02%2F21%2Fto-ruby-from-php%2F' /></p><div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fphp-princess.net%2F2007%2F02%2F21%2Fto-ruby-from-php%2F&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><img style='display:none' id="post-421-blankimage" onload="Meebo('discoverSharable', {element: ((this.parentNode.className.match('post')) ? this.parentNode : this.parentNode.parentNode) ,url:'http://php-princess.net/2007/02/21/to-ruby-from-php/',title:'To Ruby From PHP',tweet:'If you&#8217;re interested in learning Ruby, here is a list of all the simlarities and differences b',description:'If you&#8217;re interested in learning Ruby, here is a list of all the simlarities and differences b'})"><script type='text/javascript'>document.getElementById("post-421-blankimage").onload();</script><img src="http://php-princess.net/?ak_action=api_record_view&id=421&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://php-princess.net/2007/02/21/to-ruby-from-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP and Yahoo! Web Services APIs</title>
		<link>http://php-princess.net/2007/02/20/php-yahoo/</link>
		<comments>http://php-princess.net/2007/02/20/php-yahoo/#comments</comments>
		<pubDate>Wed, 21 Feb 2007 04:21:39 +0000</pubDate>
		<dc:creator>daynah</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software and Web Apps]]></category>

		<guid isPermaLink="false">http://php-princess.net/2007/02/20/php-yahoo/</guid>
		<description><![CDATA[Here&#8217;s a great source for information about using PHP with Yahoo! Web Services APIs. HOWTO Articles to help you understand our technologies and how you can use them better with PHP. Code Samples you can play with. Use them as a starting point for your own applications or study them for subtle nuances. Browser-Based Authentication [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a great source for information about using PHP with Yahoo! Web Services APIs.</p>
<ul>
<li><a href="http://developer.yahoo.com/php/#docs">HOWTO Articles</a> to help you understand our technologies and how you can use them better with PHP.</li>
<li><a href="http://developer.yahoo.com/php/#code">Code Samples</a> you can play with. Use them as a starting point for your own applications or study them for subtle nuances.</li>
<li><a href="http://developer.yahoo.com/php/#bbauth">Browser-Based Authentication</a> so you can let users authenticate using their Yahoo! id.</li>
<li><a href="http://developer.yahoo.com/php/#links">Other Resources</a> out on the Web to help you use PHP and the Yahoo! APIs to their fullest.</li>
<li><a href="http://developer.yahoo.com/php/#community">Community Resources</a> where you can join the mailing list and discuss the Yahoo! APIs with us and with other PHP developers. </li>
</ul>
<p><map name='google_ad_map_414_5ca5e442dc272ca0'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/414?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_414_5ca5e442dc272ca0' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=414&amp;url= http%3A%2F%2Fphp-princess.net%2F2007%2F02%2F20%2Fphp-yahoo%2F' /></p><div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fphp-princess.net%2F2007%2F02%2F20%2Fphp-yahoo%2F&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><img style='display:none' id="post-414-blankimage" onload="Meebo('discoverSharable', {element: ((this.parentNode.className.match('post')) ? this.parentNode : this.parentNode.parentNode) ,url:'http://php-princess.net/2007/02/20/php-yahoo/',title:'PHP and Yahoo! Web Services APIs',tweet:'Here&#8217;s a great source for information about using PHP with Yahoo! Web Services APIs.  HOWTO Ar',description:'Here&#8217;s a great source for information about using PHP with Yahoo! Web Services APIs.  HOWTO Ar'})"><script type='text/javascript'>document.getElementById("post-414-blankimage").onload();</script><img src="http://php-princess.net/?ak_action=api_record_view&id=414&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://php-princess.net/2007/02/20/php-yahoo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 1.5.1.3</title>
		<link>http://php-princess.net/2005/07/08/wordpress-1513/</link>
		<comments>http://php-princess.net/2005/07/08/wordpress-1513/#comments</comments>
		<pubDate>Fri, 08 Jul 2005 19:05:18 +0000</pubDate>
		<dc:creator>daynah</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Scripts and Coding]]></category>

		<guid isPermaLink="false">http://daynah.php-princess.net/?p=347</guid>
		<description><![CDATA[Download WordPress 1.5.1.3 “Strayhorn”! It was released a few days ago. I&#8217;ll have to test it out later. :)]]></description>
			<content:encoded><![CDATA[<p><a href="http://wordpress.org/download/">Download WordPress 1.5.1.3 “Strayhorn”</a>!  It was released a few days ago.  I&#8217;ll have to test it out later. :)</p>
<p><map name='google_ad_map_347_5ca5e442dc272ca0'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/347?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_347_5ca5e442dc272ca0' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=347&amp;url= http%3A%2F%2Fphp-princess.net%2F2005%2F07%2F08%2Fwordpress-1513%2F' /></p><div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fphp-princess.net%2F2005%2F07%2F08%2Fwordpress-1513%2F&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><img style='display:none' id="post-347-blankimage" onload="Meebo('discoverSharable', {element: ((this.parentNode.className.match('post')) ? this.parentNode : this.parentNode.parentNode) ,url:'http://php-princess.net/2005/07/08/wordpress-1513/',title:'WordPress 1.5.1.3',tweet:'Download WordPress 1.5.1.3 “Strayhorn”!  It was released a few days ago.  I&#8217;ll have to tes',description:'Download WordPress 1.5.1.3 “Strayhorn”!  It was released a few days ago.  I&#8217;ll have to tes'})"><script type='text/javascript'>document.getElementById("post-347-blankimage").onload();</script><img src="http://php-princess.net/?ak_action=api_record_view&id=347&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://php-princess.net/2005/07/08/wordpress-1513/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happy 10th Anniversary PHP!</title>
		<link>http://php-princess.net/2005/06/08/happy-10th-anniversary-php/</link>
		<comments>http://php-princess.net/2005/06/08/happy-10th-anniversary-php/#comments</comments>
		<pubDate>Wed, 08 Jun 2005 18:04:12 +0000</pubDate>
		<dc:creator>daynah</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://daynah.php-princess.net/?p=336</guid>
		<description><![CDATA[It has been 10 years since Rasmus released the first version of PHP! Wow. Happy 10th anniversary PHP!!]]></description>
			<content:encoded><![CDATA[<p><a href="http://groups.google.ch/group/comp.infosystems.www.authoring.cgi/msg/cc7d43454d64d133?oe=UTF-8&#038;output=gplain">It has been 10 years since Rasmus released the first version of PHP</a>!  Wow.  Happy 10th anniversary PHP!! </p>
<p><map name='google_ad_map_336_5ca5e442dc272ca0'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/336?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_336_5ca5e442dc272ca0' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=336&amp;url= http%3A%2F%2Fphp-princess.net%2F2005%2F06%2F08%2Fhappy-10th-anniversary-php%2F' /></p><div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fphp-princess.net%2F2005%2F06%2F08%2Fhappy-10th-anniversary-php%2F&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><img style='display:none' id="post-336-blankimage" onload="Meebo('discoverSharable', {element: ((this.parentNode.className.match('post')) ? this.parentNode : this.parentNode.parentNode) ,url:'http://php-princess.net/2005/06/08/happy-10th-anniversary-php/',title:'Happy 10th Anniversary PHP!',tweet:'It has been 10 years since Rasmus released the first version of PHP!  Wow.  Happy 10th anniversary P',description:'It has been 10 years since Rasmus released the first version of PHP!  Wow.  Happy 10th anniversary P'})"><script type='text/javascript'>document.getElementById("post-336-blankimage").onload();</script><img src="http://php-princess.net/?ak_action=api_record_view&id=336&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://php-princess.net/2005/06/08/happy-10th-anniversary-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SPG: Simple PHP Gallery</title>
		<link>http://php-princess.net/2005/03/30/spg-simple-php-gallery/</link>
		<comments>http://php-princess.net/2005/03/30/spg-simple-php-gallery/#comments</comments>
		<pubDate>Thu, 31 Mar 2005 01:17:05 +0000</pubDate>
		<dc:creator>daynah</dc:creator>
				<category><![CDATA[Daily Ramblings]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://daynah.php-princess.net/?p=258</guid>
		<description><![CDATA[I installed this Simple PHP Gallery script at work today and I just love it. I wanted a very lightweight script where I can just add photos and the links/gallery would create itself. And this was the perfect script. The layout is very easy to edit as well. There&#8217;s also a plugin for WordPress too. [...]]]></description>
			<content:encoded><![CDATA[<p>I installed this <a href="http://relativelyabsolute.com/spg/">Simple PHP Gallery</a> script at work today and I just love it.  I wanted a very lightweight script where I can just add photos and the links/gallery would create itself.  And this was the perfect script.  The layout is very easy to edit as well.  There&#8217;s also a plugin for WordPress too. :) </p>
<p>Thanks for the script, <a href="http://relativelyabsolute.com/">Paul</a>!</p>
<p><map name='google_ad_map_258_5ca5e442dc272ca0'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/258?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_258_5ca5e442dc272ca0' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=258&amp;url= http%3A%2F%2Fphp-princess.net%2F2005%2F03%2F30%2Fspg-simple-php-gallery%2F' /></p><div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fphp-princess.net%2F2005%2F03%2F30%2Fspg-simple-php-gallery%2F&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><img style='display:none' id="post-258-blankimage" onload="Meebo('discoverSharable', {element: ((this.parentNode.className.match('post')) ? this.parentNode : this.parentNode.parentNode) ,url:'http://php-princess.net/2005/03/30/spg-simple-php-gallery/',title:'SPG: Simple PHP Gallery',tweet:'I installed this Simple PHP Gallery script at work today and I just love it.  I wanted a very lightw',description:'I installed this Simple PHP Gallery script at work today and I just love it.  I wanted a very lightw'})"><script type='text/javascript'>document.getElementById("post-258-blankimage").onload();</script><img src="http://php-princess.net/?ak_action=api_record_view&id=258&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://php-princess.net/2005/03/30/spg-simple-php-gallery/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>How to Connect to a MySQL Database using PHP</title>
		<link>http://php-princess.net/2005/03/29/how-to-connect-to-a-database-using-php-and-mysql/</link>
		<comments>http://php-princess.net/2005/03/29/how-to-connect-to-a-database-using-php-and-mysql/#comments</comments>
		<pubDate>Tue, 29 Mar 2005 20:34:38 +0000</pubDate>
		<dc:creator>daynah</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Scripts and Coding]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://daynah.php-princess.net/?p=249</guid>
		<description><![CDATA[I was helping my coworker yesterday to create her first PHP-Database program. She already knew how phpMyAdmin worked, so I created a sample page for her to show how to connect to the database and then retrieve data from a query. Maybe this sample page could help you too. I commented as much of the [...]]]></description>
			<content:encoded><![CDATA[<p><img alt="" src="http://php-princess.net/wp-content/uploads/tn-php.png" title="PHP" class="alignright" width="70" height="70" />I was helping my coworker yesterday to create her first PHP-Database program.  She already knew how phpMyAdmin worked, so I created a sample page for her to show how to connect to the database and then retrieve data from a query.  Maybe this sample page could help you too.  I commented as much of the code as I could.  Let me know if you have any questions.</p>
<p><span id="more-249"></span></p>
<pre class="brush:php">
&lt;?php

/*
	Purpose: This file demonstrates how to run
		and display a mySQL query using PHP.
	Author : Daynah
	Created: 2005/03/28
*/

// Variables for database
$username     = "TestUser";
$dbpword      = "TestPassword";
$database     = "test_database_name";
$host         = "localhost";

// Connect to the database
$db = mysql_connect($host, $username, $dbpword )
	or die ("ERROR: " .mysql_error());
$connection = mysql_select_db( $database, $db );

// Run a query
$query = "SELECT * FROM myTestTable";		// The mysql statement
$result = mysql_query($query);				// The results of a query
$num_rows = mysql_num_rows($result);		// Number of rows of data

// Start the table to display the data
echo '&lt;table&gt;';

// If there is data in that query, display the data
if($num_rows)
{
	// PHP Script to iterate through the data in the database
	// This will print out each Table Row
	/*	|   ID	| Name	|  Address	|
		-----------------------------
			1	  Name1		Address1
			2	  Name2		Address2
		Assuming there are three fields in the table -- ID, Name, and Address
	*/
	while($myData = mysql_fetch_object($result)
	{
		// Print Each Row of Data -- ID, Name, Address
		echo '&lt;tr&gt;&lt;td&gt;'. $myData-&gt;ID.'&lt;/td&gt;
				  &lt;td&gt;'. $myData-&gt;Name.'&lt;/td&gt;
				  &lt;td&gt;'. $myData-&gt;Address.'&lt;/td&gt;
			  &lt;/tr&gt;';
	}
}

// If there is no data in the database.
else
{
	echo '&lt;tr&gt;&lt;td&gt;Sorry, there is no data in the database.&lt;/td&gt;&lt;/tr&gt;';
}

// Close the table tag
echo '&lt;/table&gt;';

// Close Mysql Connection
mysql_close();

?&gt;
</pre>
<p><map name='google_ad_map_249_5ca5e442dc272ca0'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/249?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_249_5ca5e442dc272ca0' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=249&amp;url= http%3A%2F%2Fphp-princess.net%2F2005%2F03%2F29%2Fhow-to-connect-to-a-database-using-php-and-mysql%2F' /></p><div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fphp-princess.net%2F2005%2F03%2F29%2Fhow-to-connect-to-a-database-using-php-and-mysql%2F&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><img style='display:none' id="post-249-blankimage" onload="Meebo('discoverSharable', {element: ((this.parentNode.className.match('post')) ? this.parentNode : this.parentNode.parentNode) ,url:'http://php-princess.net/2005/03/29/how-to-connect-to-a-database-using-php-and-mysql/',title:'How to Connect to a MySQL Database using PHP',tweet:'I was helping my coworker yesterday to create her first PHP-Database program.  She already knew how ',description:'I was helping my coworker yesterday to create her first PHP-Database program.  She already knew how '})"><script type='text/javascript'>document.getElementById("post-249-blankimage").onload();</script><img src="http://php-princess.net/?ak_action=api_record_view&id=249&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://php-princess.net/2005/03/29/how-to-connect-to-a-database-using-php-and-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Plugin: Theme Switcher</title>
		<link>http://php-princess.net/2005/03/29/wordpress-plugin-theme-switcher/</link>
		<comments>http://php-princess.net/2005/03/29/wordpress-plugin-theme-switcher/#comments</comments>
		<pubDate>Tue, 29 Mar 2005 09:51:25 +0000</pubDate>
		<dc:creator>daynah</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://daynah.php-princess.net/?p=247</guid>
		<description><![CDATA[I meant to post this a while ago, but I forgot. I installed the WordPress Theme Switcher plugin (written by Ryan) to test out all the themes (especially the ones I was submitting for Stacee). To install it, just download this file, upload it to your /wp-content/plugins/ directory. Then activate it in the Admin control [...]]]></description>
			<content:encoded><![CDATA[<p>I meant to post this a while ago, but I forgot.  I installed the <a href="http://dev.wp-plugins.org/browser/theme-switcher/">WordPress Theme Switcher</a> plugin (written by <a href="http://boren.nu/">Ryan</a>) to test out all the themes (especially the ones I was submitting for <a href="http://chasethestars.com">Stacee</a>).</p>
<p>To install it, just <a href="http://dev.wp-plugins.org/file/theme-switcher/trunk/theme-switcher.php">download this file</a>, upload it to your /wp-content/plugins/ directory.  Then activate it in the Admin control panel.</p>
<p>Now in your templates, add this to your sidebar:</p>
<div class="code">&lt;?php if (function_exists(&#8216;wp_theme_switcher&#8217;)) { ?&gt;<br />
&lt;li&gt;&lt;h2&gt;&lt;?php _e(&#8216;Themes&#8217;); ?&gt;&lt;/h2&gt;<br />
&lt;ul&gt;&lt;?php wp_theme_switcher(); ?&gt;&lt;/ul&gt;<br />
&lt;/li&gt;<br />
&lt;? } ?&gt;</div>
<p>The if statement just says, if this function is available (if the theme is activated), then print the list of themes.  Of course, you may customize the output however you want.  There&#8217;s a little bit of PHP coding, but nothing to be too scared about. :)</p>
<p><map name='google_ad_map_247_5ca5e442dc272ca0'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/247?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_247_5ca5e442dc272ca0' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=247&amp;url= http%3A%2F%2Fphp-princess.net%2F2005%2F03%2F29%2Fwordpress-plugin-theme-switcher%2F' /></p><div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fphp-princess.net%2F2005%2F03%2F29%2Fwordpress-plugin-theme-switcher%2F&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><img style='display:none' id="post-247-blankimage" onload="Meebo('discoverSharable', {element: ((this.parentNode.className.match('post')) ? this.parentNode : this.parentNode.parentNode) ,url:'http://php-princess.net/2005/03/29/wordpress-plugin-theme-switcher/',title:'WordPress Plugin: Theme Switcher',tweet:'I meant to post this a while ago, but I forgot.  I installed the WordPress Theme Switcher plugin (wr',description:'I meant to post this a while ago, but I forgot.  I installed the WordPress Theme Switcher plugin (wr'})"><script type='text/javascript'>document.getElementById("post-247-blankimage").onload();</script><img src="http://php-princess.net/?ak_action=api_record_view&id=247&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://php-princess.net/2005/03/29/wordpress-plugin-theme-switcher/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

