<?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>Leoganda.net &#187; Tips</title>
	<atom:link href="http://www.leoganda.net/category/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.leoganda.net</link>
	<description></description>
	<lastBuildDate>Tue, 25 May 2010 16:33:44 +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>The System Cannot Execute The Specified Program C++</title>
		<link>http://www.leoganda.net/the-system-cannot-execute-the-specified-program-c/</link>
		<comments>http://www.leoganda.net/the-system-cannot-execute-the-specified-program-c/#comments</comments>
		<pubDate>Tue, 25 May 2010 16:31:38 +0000</pubDate>
		<dc:creator>leoganda</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Error]]></category>

		<guid isPermaLink="false">http://www.leoganda.net/?p=76</guid>
		<description><![CDATA[Today I made a simple console application using Visual C++ 2008 and it was runs well on my development machine. But the problem occurred when I run the application on another machine, the error says &#8220;The system cannot execute the specified program&#8220;. I was guessing the problem occurred because of missing library or something, after [...]]]></description>
			<content:encoded><![CDATA[<p>Today I made a simple console application using Visual C++ 2008 and it was runs well on my development machine. But the problem occurred when I run the application on another machine, the error says &#8220;<strong>The system cannot execute the specified program</strong>&#8220;. I was guessing the problem occurred because of missing library or something, after short analysis both machine have the correct and the same library. So what&#8217;s going on??</p>
<p>I googled for this error and found <a href="http://blogs.msdn.com/b/nikolad/archive/2005/06/08/427101.aspx" target="_blank">this article</a>, it explains how this problem occurred on compiled C++ application. There&#8217;s two type of build on VC++ ( Debug and Release), my application was built in debug mode and <strong>we can&#8217;t re-distribute the application on debug mode</strong>. The built program in debug mode only runs on development machine, so in order to distribute my app I should build my application in &#8216;Release&#8217; mode. Time to switch from &#8216;Debug&#8217; to &#8216;Release&#8217; mode,</p>
<p>Open your <em>Visual Studio-&gt;(Open Project)-&gt;Project-&gt;(project name) properties</em></p>
<p><em>select the Build Tab, in configuration option choose &#8220;Release&#8221;.</em></p>
<p>Rebuild your project, you will find &#8220;Release&#8221; folder, your released application is in there.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leoganda.net/the-system-cannot-execute-the-specified-program-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Powershell FTP</title>
		<link>http://www.leoganda.net/simple-powershell-ftp/</link>
		<comments>http://www.leoganda.net/simple-powershell-ftp/#comments</comments>
		<pubDate>Mon, 03 May 2010 15:36:51 +0000</pubDate>
		<dc:creator>leoganda</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.leoganda.net/simple-powershell-ftp/</guid>
		<description><![CDATA[With Powershell we can do FTP transaction really easy. The best feature from Powershell is we can use any dll library in our script, we can import .Net libraries and etc into our script. The script below is simple FTP to upload file to FTP server. In this script I&#8217;m using System.Net.WebClient to handle the [...]]]></description>
			<content:encoded><![CDATA[<p>With Powershell we can do FTP transaction really easy. The best feature from Powershell is we can use any dll library in our script, we can import .Net libraries and etc into our script. The script below is simple FTP to upload file to FTP server. In this script I&#8217;m using System.Net.WebClient to handle the file transfer.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #800080;">$ftpuser</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;user&quot;</span>
<span style="color: #800080;">$ftppass</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;12345&quot;</span>
<span style="color: #800080;">$ftpserver</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;localhost&quot;</span>
<span style="color: #800080;">$file</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;C:\test.txt&quot;</span>
<span style="color: #800080;">$filenewname</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;test.txt&quot;</span>
&nbsp;
<span style="color: #800080;">$webclient</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">New-Object</span> System.Net.WebClient
<span style="color: #800080;">$ftp</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;ftp://&quot;</span><span style="color: pink;">+</span><span style="color: #800080;">$ftpuser</span><span style="color: pink;">+</span><span style="color: #800000;">&quot;:&quot;</span><span style="color: pink;">+</span><span style="color: #800080;">$ftppass</span><span style="color: pink;">+</span><span style="color: #800000;">&quot;@&quot;</span><span style="color: pink;">+</span><span style="color: #800080;">$ftpserver</span><span style="color: pink;">+</span><span style="color: #800000;">&quot;/&quot;</span><span style="color: pink;">+</span><span style="color: #800080;">$filenewname</span>
<span style="color: #800080;">$uri</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">New-Object</span> System.Uri<span style="color: #000000;">&#40;</span><span style="color: #800080;">$ftp</span><span style="color: #000000;">&#41;</span>
&nbsp;
<span style="color: #800080;">$webclient</span>.UploadFile<span style="color: #000000;">&#40;</span><span style="color: #800080;">$uri</span><span style="color: pink;">,</span><span style="color: #800080;">$file</span><span style="color: #000000;">&#41;</span>﻿</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.leoganda.net/simple-powershell-ftp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Powershell script sort list file</title>
		<link>http://www.leoganda.net/powershell-script-sort-list-file/</link>
		<comments>http://www.leoganda.net/powershell-script-sort-list-file/#comments</comments>
		<pubDate>Mon, 03 May 2010 15:27:09 +0000</pubDate>
		<dc:creator>leoganda</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Powershell]]></category>

		<guid isPermaLink="false">http://www.leoganda.net/?p=69</guid>
		<description><![CDATA[It&#8217;s pretty easy to sort an output from ls or Get-ChildItem using powershell, you can sort the output by name, length, and date. Sort By Name Get-ChildItem C:\ &#124; sort -property Name Sort By Size Get-ChildItem C:\ &#124; sort -property Length Sort By Date Modified Get-ChildItem C:\ &#124; sort -property LastWriteTime You also can reorder [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s pretty easy to sort an output from ls or Get-ChildItem using powershell, you can sort the output by name, length, and date.</p>
<p>Sort By Name</p>

<div class="wp_syntax"><div class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #008080; font-weight: bold;">Get-ChildItem</span> C:\ <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">sort</span> <span style="color: #008080; font-style: italic;">-property</span> Name</pre></div></div>

<p>Sort By Size</p>

<div class="wp_syntax"><div class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #008080; font-weight: bold;">Get-ChildItem</span> C:\ <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">sort</span> <span style="color: #008080; font-style: italic;">-property</span> Length</pre></div></div>

<p>Sort By Date Modified</p>

<div class="wp_syntax"><div class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #008080; font-weight: bold;">Get-ChildItem</span> C:\ <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">sort</span> <span style="color: #008080; font-style: italic;">-property</span> LastWriteTime</pre></div></div>

<p>You also can reorder the sort output with &#8220;-descending&#8221;<br />
example :</p>

<div class="wp_syntax"><div class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #008080; font-weight: bold;">Get-ChildItem</span> C:\ <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">sort</span> <span style="color: #008080; font-style: italic;">-property</span> LastWriteTime <span style="color: #008080; font-style: italic;">-descending</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.leoganda.net/powershell-script-sort-list-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python for Windows Mobile</title>
		<link>http://www.leoganda.net/python-for-windows-mobile/</link>
		<comments>http://www.leoganda.net/python-for-windows-mobile/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 10:47:35 +0000</pubDate>
		<dc:creator>leoganda</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.leoganda.net/?p=60</guid>
		<description><![CDATA[Hello, right now I&#8217;m doing development some project using Python for my new company I&#8217;m working on. I thought Python will be boring, but Python changes my mind! As programming language Python is really simple and powerful. It can be run cross platform without compile anywhere. It runs well on my Windows and Linux, so [...]]]></description>
			<content:encoded><![CDATA[<p>Hello, right now I&#8217;m doing development some project using <a href="http://www.python.org" target="_blank">Python</a> for my new company I&#8217;m working on. I thought Python will be boring, but Python changes my mind! As programming language Python is really simple and powerful. It can be run cross platform without compile anywhere. It runs well on my Windows and Linux, so I was thinking could I install Python on my Windows Mobile device? The answer is YES! I&#8217;m using Windows mobile 6.1 and runs Python perfectly on it. If you want to install Python CE on your windows mobile device, you can get the CAB file in <a href="http://garr.dl.sourceforge.net/sourceforge/pythonce/PythonCE-25-20061219.PPC2003_ARM.CAB" target="_self">here</a>. It&#8217;s free.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leoganda.net/python-for-windows-mobile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setup was unable to open information file setupqry.inf</title>
		<link>http://www.leoganda.net/setup-was-unable-to-open-information-file-setupqry-inf/</link>
		<comments>http://www.leoganda.net/setup-was-unable-to-open-information-file-setupqry-inf/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 04:42:27 +0000</pubDate>
		<dc:creator>leoganda</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.leoganda.net/?p=57</guid>
		<description><![CDATA[Hi there, today I was trying to install IIS on my local computer and I got an error &#8220;Setup was unable to open information file setupqry.inf Contact your system admin. The specific error code is 0&#215;2 at line 0&#8220;. This problem occured after I upgrade my Windows XP SP2 to SP3. The error showed up [...]]]></description>
			<content:encoded><![CDATA[<p>Hi there, today I was trying to install IIS on my local computer and I got an error &#8220;<strong>Setup was unable to open information file setupqry.inf Contact your system admin. The specific error code is 0&#215;2 at line 0</strong>&#8220;.</p>
<p>This problem occured after I upgrade my Windows XP SP2 to SP3.</p>
<p>The error showed up because some file are missing when system upgraded to SP3. Here&#8217;s the list of missing file.</p>
<p><code><br />
<strong>setupqry.inf<br />
optional.inf<br />
msnmsn.inf</strong></code></p>
<p><code><strong>setupqry.dll<br />
msgrocm.dll<br />
ocmsn.dll</strong></code></p>
<p>Paste those inf file to your <code>Windows\inf</code> directory and paste the dll file to <code>windows\system32\setup</code>. It&#8217;s fix my problem.</p>
<p>You can <a href="http://www.leoganda.net/wp-content/uploads/2009/12/Windows.zip">download those file here,</a> just extract it to your windows directory.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leoganda.net/setup-was-unable-to-open-information-file-setupqry-inf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Auto Post Using Javascript</title>
		<link>http://www.leoganda.net/auto-post-using-javascript/</link>
		<comments>http://www.leoganda.net/auto-post-using-javascript/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 12:37:05 +0000</pubDate>
		<dc:creator>leoganda</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.leoganda.net/?p=51</guid>
		<description><![CDATA[Hi there, a few weeks ago I was doing research about auto post from webpage to paypal payment page. The basic idea is the visitor fill the form, then when the visitor submit the form we will store visitor data input to database. Once data stored in database the page will be automatically redirected to [...]]]></description>
			<content:encoded><![CDATA[<p>Hi there, a few weeks ago I was doing research about auto post from webpage to paypal payment page. The basic idea is the visitor fill the form, then when the visitor submit the form we will store visitor data input to database. Once data stored in database the page will be automatically redirected to paypal website. It&#8217;s pretty easy, we will use JavaScript to do auto post. I wanna make this article as simple as possible, I just wanna show how to do auto post with Javascript.<span id="more-51"></span></p>
<h3>1. Database</h3>
<p>We will use simple database for this experiment, single table with 4 columns ( id, first_name, last_name, package).</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #ff0000;">`javascriptpost`</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">`sales`</span> <span style="color: #66cc66;">&#40;</span>
<span style="color: #ff0000;">`id`</span> INT<span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">6</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">AUTO_INCREMENT</span> <span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`first_name`</span> VARCHAR<span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">30</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`last_name`</span> VARCHAR<span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">30</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`package`</span> VARCHAR<span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">10</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #66cc66;">,</span>
<span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">`id`</span> <span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#41;</span> ENGINE <span style="color: #66cc66;">=</span> MYISAM ;</pre></div></div>

<h3>2. Form (index.php)</h3>
<p>First we need a basic form for user to input, data will be posted to post.php.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;html&gt;
	&lt;body&gt;
		&lt;form action=&quot;post.php&quot; method=&quot;post&quot;&gt;						
				&lt;p&gt;
				&lt;label&gt;First Name&lt;/label&gt;
				&lt;input type=&quot;text&quot; id=&quot;first_name&quot; name=&quot;first_name&quot;/&gt;
				&lt;/p&gt;
				&lt;p&gt;
				&lt;label&gt;Last Name&lt;/label&gt;
				&lt;input type=&quot;text&quot; id=&quot;last_name&quot; name=&quot;last_name&quot;/&gt;
				&lt;/p&gt;				
				&lt;p&gt;
				&lt;label&gt;Package&lt;/label&gt;
				&lt;select id=&quot;package&quot; name=&quot;package&quot;&gt;
					&lt;option value=&quot;A&quot;&gt;A&lt;/option&gt;
					&lt;option value=&quot;B&quot;&gt;B&lt;/option&gt;
					&lt;option value=&quot;C&quot;&gt;C&lt;/option&gt;
				&lt;/select&gt;
				&lt;/p&gt;				
				&lt;input type=&quot;submit&quot; value=&quot;submit&quot;/&gt;				
		&lt;/form&gt;
	&lt;body&gt;
&lt;/html&gt;</pre></div></div>

<h3>3. Post.php</h3>
<p>In post.php we will retrieve the posted data from index.php and store the data to database.<br />
Once data stored, the pages will be redirected to paypal website.</p>
<p>We will use javascript syntax to do autopost,</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script language<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;JavaScript&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #003366; font-weight: bold;">var</span> time <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span>
<span style="color: #003366; font-weight: bold;">function</span> subm<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'paypal'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">submit</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p><strong>post.php</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">isSet</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'first_name'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$firstname</span><span style="color: #339933;">=</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'first_name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$lastname</span><span style="color: #339933;">=</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'last_name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$package</span><span style="color: #339933;">=</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'package'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">switch</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$package</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">&quot;A&quot;</span><span style="color: #339933;">:</span> <span style="color: #000088;">$amount</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">;</span>break<span style="color: #339933;">;</span>
		<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">&quot;B&quot;</span><span style="color: #339933;">:</span> <span style="color: #000088;">$amount</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">20</span><span style="color: #339933;">;</span>break<span style="color: #339933;">;</span>
		<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">&quot;C&quot;</span><span style="color: #339933;">:</span> <span style="color: #000088;">$amount</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">30</span><span style="color: #339933;">;</span>break<span style="color: #339933;">;</span>
		<span style="color: #b1b100;">default</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$amount</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000088;">$sql</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;INSERT INTO sales (first_name,last_name,package) values ('<span style="color: #006699; font-weight: bold;">$firstname</span>','<span style="color: #006699; font-weight: bold;">$lastname</span>','<span style="color: #006699; font-weight: bold;">$package</span>')&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$con</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;localhost&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;root&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$con</span><span style="color: #009900;">&#41;</span>
	  <span style="color: #009900;">&#123;</span>
	  <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Could not connect: '</span> <span style="color: #339933;">.</span> <span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	  <span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;javascriptpost&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$con</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//insert to database</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;title&gt;Home&lt;/title&gt;
&nbsp;
&lt;script language=&quot;JavaScript&quot;&gt;
var time = null
function subm() {
document.getElementById('paypal').submit();
}
&lt;/script&gt;
&nbsp;
&lt;/head&gt;
	&lt;body  onload=&quot;timer=setTimeout('subm()',2500)&quot;&gt;
        &lt;div id=&quot;content&quot;&gt;
  			&lt;center&gt;
            	&lt;h3&gt;Thank you for booking&lt;/h3&gt;                
                &lt;p&gt;Now we will redirect to payment page&lt;/p&gt;            
            &lt;/center&gt;
				&lt;form action=&quot;https://www.paypal.com/cgi-bin/webscr&quot; method=&quot;post&quot; onSubmit=&quot;&quot; name=&quot;paypal&quot; id=&quot;paypal&quot;&gt;
					    &lt;input type=&quot;hidden&quot; name=&quot;cmd&quot; value=&quot;_xclick&quot;&gt;
						&lt;input type=&quot;hidden&quot; name=&quot;business&quot; value=&quot;your-email@email.com&quot;&gt;
						&lt;input type=&quot;hidden&quot; name=&quot;item_name&quot; value=&quot;Package <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$package</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
						&lt;input type=&quot;hidden&quot; name=&quot;amount&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$amount</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
						&lt;input type=&quot;hidden&quot; name=&quot;currency_code&quot; value=&quot;USD&quot;&gt;
						&lt;input type=&quot;hidden&quot; name=&quot;return&quot; value=&quot;http://www.leoganda.net&quot;&gt;
						&lt;input type=&quot;hidden&quot; name=&quot;defined_quantity&quot; value=&quot;1&quot;&gt;
				&lt;/form&gt;
			&lt;/div&gt;&lt;!--content--&gt;
	&lt;/body&gt;
&lt;/html&gt;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.leoganda.net/auto-post-using-javascript/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Solving Zend Framework error &#8220;An Error Has Occurred A project profile was not found&#8221;</title>
		<link>http://www.leoganda.net/solving-zend-framework-error-an-error-has-occurred-a-project-profile-was-not-found/</link>
		<comments>http://www.leoganda.net/solving-zend-framework-error-an-error-has-occurred-a-project-profile-was-not-found/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 02:39:22 +0000</pubDate>
		<dc:creator>leoganda</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.leoganda.net/?p=47</guid>
		<description><![CDATA[Hi there, I had an error &#8220;An Error Has Occurred A project profile was not found&#8221; on Zend framework command line when I tried to generate an action for my project. I&#8217;m using Windows XP and for the web server I&#8217;m using XAMPP. The &#8220;An Error Has Occurred A project profile was not found&#8221; happened [...]]]></description>
			<content:encoded><![CDATA[<p>Hi there, I had an error &#8220;<strong>An Error Has Occurred A project profile was not found</strong>&#8221; on Zend framework command line when I tried to generate an action for my project. I&#8217;m using Windows XP and for the web server I&#8217;m using XAMPP. The &#8220;<strong>An Error Has Occurred A project profile was not found</strong>&#8221; happened because we have wrong include path in our php.ini.</p>
<p>Open your php.ini and find the include_path line, insert your zend framework library path into the line before the PEAR path.</p>
<p><code>include_path = ".;E:\xampp\htdocs\ZendFramework\library;E:\xampp\php\PEAR"</code></p>
<p>Save the file and restart your Apache. Good luck <img src='http://www.leoganda.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.leoganda.net/solving-zend-framework-error-an-error-has-occurred-a-project-profile-was-not-found/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to enable XAMPP SSL socket transport</title>
		<link>http://www.leoganda.net/how-to-enable-xampp-ssl-socket-transport/</link>
		<comments>http://www.leoganda.net/how-to-enable-xampp-ssl-socket-transport/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 13:37:06 +0000</pubDate>
		<dc:creator>leoganda</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[XAMPP]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.leoganda.net/?p=24</guid>
		<description><![CDATA[Hi today I have an experiment with GData in Zend Framework PHP , and found an error that my XAMPP prevent SSL socket transport and return this error. Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException' with message 'Unable to Connect to ssl://www.google.com:443. Error #24: Unable to find the socket transport "ssl" - did you forget to enable [...]]]></description>
			<content:encoded><![CDATA[<p>Hi today I have an experiment with <a href="http://framework.zend.com/download/webservices" target="_blank">GData</a> in Zend Framework PHP , and found an error that my <a href="http://www.apachefriends.org/en/xampp.html" target="_blank">XAMPP </a>prevent SSL socket transport and return this error.</p>
<p><code>Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException' with message 'Unable to Connect to ssl://www.google.com:443. Error #24: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?'</code><span id="more-24"></span></p>
<p>Here&#8217;s the solution to make your XAMPP support socket transport SSL.<br />
1. First stop your Apache service<br />
2. Find <code>libeay32.dll</code> and <code>ssleay32.dll</code> in <code>xampp\php\</code> folder, and copy it into  <code>xampp\apache\bin\</code> folder. Just overwrite the older files in there.<br />
3. Edit <code>php.ini</code> file in <code>xampp\apache\bin</code>, remove the semicolon in &#8220;<code>;extension=php_openssl.dll</code>&#8221;<br />
4. Start the Apache service</p>
<p>That&#8217;s it, your SSL transport socket in your XAMPP has been activated.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leoganda.net/how-to-enable-xampp-ssl-socket-transport/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
