<?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>Alex Briffett &#187; Web Code</title>
	<atom:link href="http://www.briffett.net/category/blogs/webcode/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.briffett.net</link>
	<description>Life is just a state of mind</description>
	<lastBuildDate>Wed, 17 Feb 2010 14:21:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Internet Explorer Clears PHP Session Cookies</title>
		<link>http://www.briffett.net/2010/02/17/internet-explorer-clears-php-session-cookies/</link>
		<comments>http://www.briffett.net/2010/02/17/internet-explorer-clears-php-session-cookies/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 14:08:40 +0000</pubDate>
		<dc:creator>Alex Briffett</dc:creator>
				<category><![CDATA[Blogs]]></category>
		<category><![CDATA[Web Code]]></category>

		<guid isPermaLink="false">http://www.briffett.net/?p=323</guid>
		<description><![CDATA[Internet Explorer Clears PHP Session Cookies]]></description>
			<content:encoded><![CDATA[<p>I set a session cookie in a PHP script accessed via an iframe in a Google Site as a gadget.  The PHP script did a check on the user and if ok, set the session cookie so that they could access secure information on another system on the same domain as the first PHP script.  Once the cookie was set, I used a redirect to let the user access the secure information...</p>
<div style="padding: 10px; background-color: #eee;">
<p style="padding-left: 30px;"><strong>&lt;?php</strong></p>
<p style="padding-left: 30px;"><strong>if ($user == 'ok')</strong></p>
<p style="padding-left: 30px;"><strong>{</strong></p>
<p style="padding-left: 30px;"><strong>    session_start();</strong></p>
<p style="padding-left: 30px;"><strong>$_SESSION['allowed'] = 1;</strong></p>
<p style="padding-left: 30px;"><strong>header("Location: securepage.php");</strong></p>
<p style="padding-left: 30px;"><strong>}</strong></p>
<p style="padding-left: 30px;"><strong>?&gt;</strong></p>
</div>
<p>This worked fine in Firefox and Chrome but not in Internet Explorer 7.  Having debugged the code, I realised that the $_SESSION['allowed'] = 1 was not making it to the secure information PHP script.  Internet Explorer was deleting or not receiving the PHP SESSION information.</p>
<p>This appears to be a security measure in Internet Explorer 6, 7 and potentially 8.  In any case, the fix is to do the following on the first PHP script where you start the session.</p>
<div style="padding: 10px; background-color: #eee;">
<p style="padding-left: 30px;"><strong>&lt;?php</strong></p>
<p style="padding-left: 30px;"><strong>if ($user == 'ok')</strong></p>
<p style="padding-left: 30px;"><strong>{</strong></p>
<p style="padding-left: 30px;"><strong>    session_start();</strong></p>
<p style="padding-left: 30px;"><strong>    header('P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"');</strong></p>
<p style="padding-left: 30px;"><strong>    $_SESSION['allowed'] = 1;</strong></p>
<p style="padding-left: 30px;"><strong>    header("Location: securepage.php");</strong></p>
<p style="padding-left: 30px;"><strong>}</strong></p>
<p style="padding-left: 30px;"><strong>?&gt;</strong></p>
</div>
<p>This extra P3P header tells Internet Explorer to accept the cookies from the first PHP script as it links or redirects to the securepage.php.  I am not sure why IE would interpret doing this as a security threat but it could be to do with doing a header("Location... from within an iframe.  Security level in Internet Explorer was set to medium-high.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It | Post It | Share It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://blinklist.com/index.php?Action=Blink/addblink.php&amp;Name=Internet+Explorer+Clears+PHP+Session+Cookies&amp;Description=Internet+Explorer+Clears+PHP+Session+Cookies&amp;Url=http%3A%2F%2Fwww.briffett.net%2F2010%2F02%2F17%2Finternet-explorer-clears-php-session-cookies%2F" rel="nofollow" title="Add to&nbsp;BlinkList"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/blinklist.png" title="Add to&nbsp;BlinkList" alt="Add to&nbsp;BlinkList" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.bloglines.com/sub/http%3A%2F%2Fwww.briffett.net%2F2010%2F02%2F17%2Finternet-explorer-clears-php-session-cookies%2F" rel="nofollow" title="Add to&nbsp;Bloglines"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/bloglines.png" title="Add to&nbsp;Bloglines" alt="Add to&nbsp;Bloglines" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://blogmarks.net/my/new.php?mini=1&amp;simple=1&amp;url=http%3A%2F%2Fwww.briffett.net%2F2010%2F02%2F17%2Finternet-explorer-clears-php-session-cookies%2F&amp;title=Internet+Explorer+Clears+PHP+Session+Cookies" rel="nofollow" title="Add to&nbsp;Blogmarks"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/bmarks.png" title="Add to&nbsp;Blogmarks" alt="Add to&nbsp;Blogmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fwww.briffett.net%2F2010%2F02%2F17%2Finternet-explorer-clears-php-session-cookies%2F&amp;submitHeadline=Internet+Explorer+Clears+PHP+Session+Cookies&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.connotea.org/addpopup?continue=confirm&amp;uri=http%3A%2F%2Fwww.briffett.net%2F2010%2F02%2F17%2Finternet-explorer-clears-php-session-cookies%2F&amp;title=Internet+Explorer+Clears+PHP+Session+Cookies" rel="nofollow" title="Add to&nbsp;Connotea"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/connotea.png" title="Add to&nbsp;Connotea" alt="Add to&nbsp;Connotea" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.briffett.net%2F2010%2F02%2F17%2Finternet-explorer-clears-php-session-cookies%2F&amp;title=Internet+Explorer+Clears+PHP+Session+Cookies" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.diigo.com/post?url=http%3A%2F%2Fwww.briffett.net%2F2010%2F02%2F17%2Finternet-explorer-clears-php-session-cookies%2F&amp;title=Internet+Explorer+Clears+PHP+Session+Cookies" rel="nofollow" title="Add to&nbsp;Diigo"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/diigo.png" title="Add to&nbsp;Diigo" alt="Add to&nbsp;Diigo" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.briffett.net%2F2010%2F02%2F17%2Finternet-explorer-clears-php-session-cookies%2F&amp;title=Internet+Explorer+Clears+PHP+Session+Cookies" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.briffett.net%2F2010%2F02%2F17%2Finternet-explorer-clears-php-session-cookies%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://cgi.fark.com/cgi/fark/farkit.pl?u=http%3A%2F%2Fwww.briffett.net%2F2010%2F02%2F17%2Finternet-explorer-clears-php-session-cookies%2F&amp;h=Internet+Explorer+Clears+PHP+Session+Cookies" rel="nofollow" title="Add to&nbsp;Fark"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/fark.png" title="Add to&nbsp;Fark" alt="Add to&nbsp;Fark" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://fleck.com/litebookmarklet.php?url=http%3A%2F%2Fwww.briffett.net%2F2010%2F02%2F17%2Finternet-explorer-clears-php-session-cookies%2F&amp;title=Internet+Explorer+Clears+PHP+Session+Cookies" rel="nofollow" title="Add to&nbsp;Fleck"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/fleck.png" title="Add to&nbsp;Fleck" alt="Add to&nbsp;Fleck" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.briffett.net%2F2010%2F02%2F17%2Finternet-explorer-clears-php-session-cookies%2F&amp;title=Internet+Explorer+Clears+PHP+Session+Cookies" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http%3A%2F%2Fwww.briffett.net%2F2010%2F02%2F17%2Finternet-explorer-clears-php-session-cookies%2F&amp;bm_description=Internet+Explorer+Clears+PHP+Session+Cookies" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.briffett.net%2F2010%2F02%2F17%2Finternet-explorer-clears-php-session-cookies%2F&amp;title=Internet+Explorer+Clears+PHP+Session+Cookies" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.briffett.net%2F2010%2F02%2F17%2Finternet-explorer-clears-php-session-cookies%2F&amp;title=Internet+Explorer+Clears+PHP+Session+Cookies" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.briffett.net%2F2010%2F02%2F17%2Finternet-explorer-clears-php-session-cookies%2F&amp;title=Internet+Explorer+Clears+PHP+Session+Cookies" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.spurl.net/spurl.php?url=http%3A%2F%2Fwww.briffett.net%2F2010%2F02%2F17%2Finternet-explorer-clears-php-session-cookies%2F&amp;title=Internet+Explorer+Clears+PHP+Session+Cookies" rel="nofollow" title="Add to&nbsp;Spurl"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/spurl.png" title="Add to&nbsp;Spurl" alt="Add to&nbsp;Spurl" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.briffett.net%2F2010%2F02%2F17%2Finternet-explorer-clears-php-session-cookies%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Internet+Explorer+Clears+PHP+Session+Cookies+@+http%3A%2F%2Fwww.briffett.net%2F2010%2F02%2F17%2Finternet-explorer-clears-php-session-cookies%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.briffett.net%2F2010%2F02%2F17%2Finternet-explorer-clears-php-session-cookies%2F&amp;t=Internet+Explorer+Clears+PHP+Session+Cookies" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.briffett.net/2010/02/17/internet-explorer-clears-php-session-cookies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple PHP Function to Maintain Drop-Down State</title>
		<link>http://www.briffett.net/2010/01/14/simple-php-function-to-maintain-drop-down-state/</link>
		<comments>http://www.briffett.net/2010/01/14/simple-php-function-to-maintain-drop-down-state/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 16:28:32 +0000</pubDate>
		<dc:creator>Alex Briffett</dc:creator>
				<category><![CDATA[Web Code]]></category>

		<guid isPermaLink="false">http://www.briffett.net/?p=260</guid>
		<description><![CDATA[This PHP function is a quick, simple way to maintain the state of select / drop downs when the form input is invalid. Bookmark It &#124; Post It &#124; Share It]]></description>
			<content:encoded><![CDATA[<p>This PHP function is a quick, simple way to maintain the state of select / drop downs when the form input is invalid.</p>
<p><code><?php<br />
/**<br />
* Function to draw drop down boxes and allow the state to be maintained<br />
* if the form has an error<br />
*<br />
* @param array $vals - select box values<br />
* @param array $text - select box show values<br />
* @param string $search - the name/id of the select box to be searched for<br />
*/<br />
function dropDown( $vals, $text, $search )<br />
{<br />
for ($i=0; $i &lt; count($vals); $i++)<br />
{<br />
if ($search == trim($vals[$i]))<br />
{<br />
$selected = "selected=\"selected\"";<br />
}<br />
else<br />
{<br />
$selected = "";<br />
}<br />
$result .= "$text[$i]\n";<br />
}<br />
return ($result);<br />
}<br />
?></code></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It | Post It | Share It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://blinklist.com/index.php?Action=Blink/addblink.php&amp;Name=Simple+PHP+Function+to+Maintain+Drop-Down+State&amp;Description=Simple+PHP+Function+to+Maintain+Drop-Down+State&amp;Url=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fsimple-php-function-to-maintain-drop-down-state%2F" rel="nofollow" title="Add to&nbsp;BlinkList"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/blinklist.png" title="Add to&nbsp;BlinkList" alt="Add to&nbsp;BlinkList" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.bloglines.com/sub/http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fsimple-php-function-to-maintain-drop-down-state%2F" rel="nofollow" title="Add to&nbsp;Bloglines"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/bloglines.png" title="Add to&nbsp;Bloglines" alt="Add to&nbsp;Bloglines" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://blogmarks.net/my/new.php?mini=1&amp;simple=1&amp;url=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fsimple-php-function-to-maintain-drop-down-state%2F&amp;title=Simple+PHP+Function+to+Maintain+Drop-Down+State" rel="nofollow" title="Add to&nbsp;Blogmarks"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/bmarks.png" title="Add to&nbsp;Blogmarks" alt="Add to&nbsp;Blogmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fsimple-php-function-to-maintain-drop-down-state%2F&amp;submitHeadline=Simple+PHP+Function+to+Maintain+Drop-Down+State&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.connotea.org/addpopup?continue=confirm&amp;uri=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fsimple-php-function-to-maintain-drop-down-state%2F&amp;title=Simple+PHP+Function+to+Maintain+Drop-Down+State" rel="nofollow" title="Add to&nbsp;Connotea"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/connotea.png" title="Add to&nbsp;Connotea" alt="Add to&nbsp;Connotea" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fsimple-php-function-to-maintain-drop-down-state%2F&amp;title=Simple+PHP+Function+to+Maintain+Drop-Down+State" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.diigo.com/post?url=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fsimple-php-function-to-maintain-drop-down-state%2F&amp;title=Simple+PHP+Function+to+Maintain+Drop-Down+State" rel="nofollow" title="Add to&nbsp;Diigo"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/diigo.png" title="Add to&nbsp;Diigo" alt="Add to&nbsp;Diigo" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fsimple-php-function-to-maintain-drop-down-state%2F&amp;title=Simple+PHP+Function+to+Maintain+Drop-Down+State" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fsimple-php-function-to-maintain-drop-down-state%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://cgi.fark.com/cgi/fark/farkit.pl?u=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fsimple-php-function-to-maintain-drop-down-state%2F&amp;h=Simple+PHP+Function+to+Maintain+Drop-Down+State" rel="nofollow" title="Add to&nbsp;Fark"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/fark.png" title="Add to&nbsp;Fark" alt="Add to&nbsp;Fark" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://fleck.com/litebookmarklet.php?url=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fsimple-php-function-to-maintain-drop-down-state%2F&amp;title=Simple+PHP+Function+to+Maintain+Drop-Down+State" rel="nofollow" title="Add to&nbsp;Fleck"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/fleck.png" title="Add to&nbsp;Fleck" alt="Add to&nbsp;Fleck" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fsimple-php-function-to-maintain-drop-down-state%2F&amp;title=Simple+PHP+Function+to+Maintain+Drop-Down+State" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fsimple-php-function-to-maintain-drop-down-state%2F&amp;bm_description=Simple+PHP+Function+to+Maintain+Drop-Down+State" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fsimple-php-function-to-maintain-drop-down-state%2F&amp;title=Simple+PHP+Function+to+Maintain+Drop-Down+State" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fsimple-php-function-to-maintain-drop-down-state%2F&amp;title=Simple+PHP+Function+to+Maintain+Drop-Down+State" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fsimple-php-function-to-maintain-drop-down-state%2F&amp;title=Simple+PHP+Function+to+Maintain+Drop-Down+State" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.spurl.net/spurl.php?url=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fsimple-php-function-to-maintain-drop-down-state%2F&amp;title=Simple+PHP+Function+to+Maintain+Drop-Down+State" rel="nofollow" title="Add to&nbsp;Spurl"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/spurl.png" title="Add to&nbsp;Spurl" alt="Add to&nbsp;Spurl" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fsimple-php-function-to-maintain-drop-down-state%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Simple+PHP+Function+to+Maintain+Drop-Down+State+@+http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fsimple-php-function-to-maintain-drop-down-state%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fsimple-php-function-to-maintain-drop-down-state%2F&amp;t=Simple+PHP+Function+to+Maintain+Drop-Down+State" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.briffett.net/2010/01/14/simple-php-function-to-maintain-drop-down-state/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP 5+ and MySQL 4.0 Could not connect</title>
		<link>http://www.briffett.net/2010/01/14/php-5-and-mysql-4-0/</link>
		<comments>http://www.briffett.net/2010/01/14/php-5-and-mysql-4-0/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 11:40:18 +0000</pubDate>
		<dc:creator>Alex Briffett</dc:creator>
				<category><![CDATA[Web Code]]></category>
		<category><![CDATA[Could not connect]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql4]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php5]]></category>

		<guid isPermaLink="false">http://www.briffett.net/?p=242</guid>
		<description><![CDATA[I got the following error: Could not connect: Connecting to 3.22, 3.23 &#038; 4.0 servers is not supported]]></description>
			<content:encoded><![CDATA[<p>Hopefully you should never encounter this problem but I recently needed to do an insert into a MySQL 4.0 table from a remote installation of PHP 5.  I could connect from the PHP5 server to the MySQL 4.0 server via the command line, so assumed this would work find using PHP5.</p>
<p>I got the following error: Could not connect: Connecting to 3.22, 3.23 &amp; 4.0 servers is not supported</p>
<p>Basically, later versions of PHP use a password encryption algorithm which means they are incompatible with MySQL 4.0 but not MySQL 4.1+.</p>
<p>Since the command line connection worked, the solution was to create a shell script on the PHP5 server which looked similar to the following:</p>
<div style="padding: 10px; background-color: #eee;">
<p style="padding-left: 30px;"><strong>#!/bin/sh</strong></p>
<p style="padding-left: 30px;"><strong>/usr/bin/mysql -u USERNAME -pPASSWORD DBNAME -h HOST&lt;&lt;STOP<br />
insert into table (name, email) values ('$1','$2')<br />
\g<br />
STOP<br />
exit</strong></p>
</div>
<p>You will need to swap the capitalized variables for your own USERNAME, PASSWORD, DBNAME and HOST.</p>
<p>I called the shell script doinsert.sh and chmodded it 755 to make it executable.  Then, in my PHP script I used:</p>
<div style="padding: 10px; background-color: #eee;">
<p style="padding-left: 30px;"><strong>&lt;?php<br />
</strong></p>
<p style="padding-left: 30px;"><strong>$r = shell_exec('./doinsert.sh ' . $name . " " . $email);</strong></p>
<p style="padding-left: 30px;"><strong>?&gt;</strong></p>
</div>
<p>...which executes the shell script and runs the insert statement I was aiming for.  If you want to run a select statement instead of my insert example, then anything returned by the shell script should be available in $r.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It | Post It | Share It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://blinklist.com/index.php?Action=Blink/addblink.php&amp;Name=PHP+5%2B+and+MySQL+4.0+Could+not+connect&amp;Description=PHP+5%2B+and+MySQL+4.0+Could+not+connect&amp;Url=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fphp-5-and-mysql-4-0%2F" rel="nofollow" title="Add to&nbsp;BlinkList"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/blinklist.png" title="Add to&nbsp;BlinkList" alt="Add to&nbsp;BlinkList" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.bloglines.com/sub/http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fphp-5-and-mysql-4-0%2F" rel="nofollow" title="Add to&nbsp;Bloglines"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/bloglines.png" title="Add to&nbsp;Bloglines" alt="Add to&nbsp;Bloglines" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://blogmarks.net/my/new.php?mini=1&amp;simple=1&amp;url=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fphp-5-and-mysql-4-0%2F&amp;title=PHP+5%2B+and+MySQL+4.0+Could+not+connect" rel="nofollow" title="Add to&nbsp;Blogmarks"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/bmarks.png" title="Add to&nbsp;Blogmarks" alt="Add to&nbsp;Blogmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fphp-5-and-mysql-4-0%2F&amp;submitHeadline=PHP+5%2B+and+MySQL+4.0+Could+not+connect&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.connotea.org/addpopup?continue=confirm&amp;uri=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fphp-5-and-mysql-4-0%2F&amp;title=PHP+5%2B+and+MySQL+4.0+Could+not+connect" rel="nofollow" title="Add to&nbsp;Connotea"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/connotea.png" title="Add to&nbsp;Connotea" alt="Add to&nbsp;Connotea" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fphp-5-and-mysql-4-0%2F&amp;title=PHP+5%2B+and+MySQL+4.0+Could+not+connect" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.diigo.com/post?url=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fphp-5-and-mysql-4-0%2F&amp;title=PHP+5%2B+and+MySQL+4.0+Could+not+connect" rel="nofollow" title="Add to&nbsp;Diigo"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/diigo.png" title="Add to&nbsp;Diigo" alt="Add to&nbsp;Diigo" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fphp-5-and-mysql-4-0%2F&amp;title=PHP+5%2B+and+MySQL+4.0+Could+not+connect" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fphp-5-and-mysql-4-0%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://cgi.fark.com/cgi/fark/farkit.pl?u=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fphp-5-and-mysql-4-0%2F&amp;h=PHP+5%2B+and+MySQL+4.0+Could+not+connect" rel="nofollow" title="Add to&nbsp;Fark"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/fark.png" title="Add to&nbsp;Fark" alt="Add to&nbsp;Fark" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://fleck.com/litebookmarklet.php?url=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fphp-5-and-mysql-4-0%2F&amp;title=PHP+5%2B+and+MySQL+4.0+Could+not+connect" rel="nofollow" title="Add to&nbsp;Fleck"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/fleck.png" title="Add to&nbsp;Fleck" alt="Add to&nbsp;Fleck" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fphp-5-and-mysql-4-0%2F&amp;title=PHP+5%2B+and+MySQL+4.0+Could+not+connect" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fphp-5-and-mysql-4-0%2F&amp;bm_description=PHP+5%2B+and+MySQL+4.0+Could+not+connect" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fphp-5-and-mysql-4-0%2F&amp;title=PHP+5%2B+and+MySQL+4.0+Could+not+connect" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fphp-5-and-mysql-4-0%2F&amp;title=PHP+5%2B+and+MySQL+4.0+Could+not+connect" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fphp-5-and-mysql-4-0%2F&amp;title=PHP+5%2B+and+MySQL+4.0+Could+not+connect" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.spurl.net/spurl.php?url=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fphp-5-and-mysql-4-0%2F&amp;title=PHP+5%2B+and+MySQL+4.0+Could+not+connect" rel="nofollow" title="Add to&nbsp;Spurl"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/spurl.png" title="Add to&nbsp;Spurl" alt="Add to&nbsp;Spurl" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fphp-5-and-mysql-4-0%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+PHP+5%2B+and+MySQL+4.0+Could+not+connect+@+http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fphp-5-and-mysql-4-0%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.briffett.net%2F2010%2F01%2F14%2Fphp-5-and-mysql-4-0%2F&amp;t=PHP+5%2B+and+MySQL+4.0+Could+not+connect" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.briffett.net/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.briffett.net/2010/01/14/php-5-and-mysql-4-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.360 seconds -->
