<?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 Code &#8211; Programming blog &#8211; website programming blog, blog on website programming .net, java , php and mor</title>
	<atom:link href="https://www.searchenginegenie.com/programming-blog/tag/php-code/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.searchenginegenie.com/programming-blog</link>
	<description></description>
	<lastBuildDate>Mon, 17 Jul 2017 03:57:02 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.5</generator>
	<item>
		<title>To upload a file using php</title>
		<link>https://www.searchenginegenie.com/programming-blog/to-upload-a-file-using-php/</link>
					<comments>https://www.searchenginegenie.com/programming-blog/to-upload-a-file-using-php/#respond</comments>
		
		<dc:creator><![CDATA[Camilla]]></dc:creator>
		<pubDate>Thu, 05 Aug 2010 05:07:11 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP Code]]></category>
		<guid isPermaLink="false">http://www.searchenginegenie.com/programming-blog/?p=350</guid>

					<description><![CDATA[Steps: 1. Create new html file and copy upload.html code and save it as upload.html. 2. Create new php file and copy uploader.php code and save it as uploader.php. 3. Run upload.html, then it will display the html data. 4. Click browse button and select any file or image and press upload button. 5. Then [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong>Steps:</strong></p>
<p><strong>1. Create new html file and copy upload.html code and save it as upload.html.</strong></p>
<p><strong>2. Create new php file and copy uploader.php code and save it as uploader.php.</strong></p>
<p><strong>3. Run upload.html, then it will display the html data.</strong></p>
<p><strong>4. Click browse button and select any file or image and press upload button.</strong></p>
<p><strong>5. Then it will transfer that specific file or image to the created folder and display the output as file is uploaded.</strong></p>
<p><strong>upload.html:</strong></p>
<p>[php]</p>
<p>&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;<br />
 &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;<br />
 &lt;head&gt;<br />
 &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot; /&gt;<br />
 &lt;title&gt;upload&lt;/title&gt;<br />
 &lt;/head&gt;</p>
<p>&lt;body&gt;<br />
 &lt;form enctype=&quot;multipart/form-data&quot; method=&quot;post&quot; action=&quot;uploader.php&quot;&gt;<br />
 &lt;input type=&quot;file&quot; name=&quot;file&quot; /&gt;<br />
 &lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;upload&quot; /&gt;<br />
 &lt;/form&gt;<br />
 &lt;/body&gt;<br />
 &lt;/html&gt;</p>
<p>[/php]</p>
<p>It displays the output as:</p>
<form action="uploader.php" method="post" enctype="multipart/form-data"><input type="file" name="file" /><br />
<input type="submit" name="submit" value="upload" /></form>
<form action="uploader.php" method="post" enctype="multipart/form-data"><strong>uploader.php</strong></form>
<form action="uploader.php" method="post" enctype="multipart/form-data">[php]&lt;/form&gt;&lt;form action=&quot;uploader.php&quot; method=&quot;post&quot; enctype=&quot;multipart/form-data&quot;&gt;&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;<br />
 &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;<br />
 &lt;head&gt;<br />
 &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot; /&gt;<br />
 &lt;title&gt;Untitled Document&lt;/title&gt;<br />
&lt;/head&gt;&lt;body&gt;<br />
 &lt;?php<br />
 if(isset($_REQUEST[&#8216;submit&#8217;]))<br />
 {<br />
 $to=&quot;uploaded/&quot;.$_FILES[&#8216;file&#8217;][&#8216;name&#8217;];<br />
 move_uploaded_file($_FILES[&#8216;file&#8217;][&#8216;tmp_name&#8217;],$to);<br />
 echo &quot;file is uploaded&quot;;</p>
<p>}<br />
 ?&gt;<br />
 &lt;/body&gt;<br />
 &lt;/html&gt;</p>
<p>[/php]</p>
<p>//create a new folder uploaded</p>
</form>
]]></content:encoded>
					
					<wfw:commentRss>https://www.searchenginegenie.com/programming-blog/to-upload-a-file-using-php/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Calculate add,sub,mul using php</title>
		<link>https://www.searchenginegenie.com/programming-blog/calculate-addsubmul-using-php/</link>
					<comments>https://www.searchenginegenie.com/programming-blog/calculate-addsubmul-using-php/#respond</comments>
		
		<dc:creator><![CDATA[Camilla]]></dc:creator>
		<pubDate>Fri, 30 Jul 2010 05:05:30 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP Code]]></category>
		<guid isPermaLink="false">http://www.searchenginegenie.com/programming-blog/?p=340</guid>

					<description><![CDATA[Steps: 1. Create new html file and copy calculate.html code and save it as calculate.html. 2. Create new php file and copy calculation.php code and save it as calculation.php. 3. Run calculate.html, then it will display the html data. 4. Enter value1, value2 and press add or sub or mul button and press calculate button. [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong>Steps:</strong></p>
<p><strong>1. Create new html file and copy calculate.html code and save it as calculate.html.</strong></p>
<p><strong>2. Create new php file and copy calculation.php code and save it as calculation.php.</strong></p>
<p><strong>3. Run calculate.html, then it will display the html data.</strong></p>
<p><strong>4. Enter value1, value2 and press add or sub or mul button and press calculate button.</strong></p>
<p><strong>5. Then it will transfer to calculation.php which displays the output.</strong></p>
<p><strong>calculate.htm:</strong></p>
<p>[php]</p>
<p>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;<br />
&lt;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221;&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html; charset=iso-8859-1&#8243; /&gt;<br />
&lt;title&gt;calculation&lt;/title&gt;<br />
&lt;/head&gt;</p>
<p>&lt;body&gt;<br />
&lt;form method=&#8221;post&#8221; action=&#8221;calculation.php&#8221;&gt;<br />
Value 1: &lt;input type=&#8221;text&#8221; name=&#8221;val1&#8243; size=&#8221;7&#8243;&gt;&lt;br /&gt;&lt;br /&gt;<br />
Value 2: &lt;input type=&#8221;text&#8221; name=&#8221;val2&#8243; size=&#8221;7&#8243;&gt;<br />
&lt;p&gt;<br />
&lt;input type=&#8221;radio&#8221; name=&#8221;calculate&#8221; value=&#8221;add&#8221;  /&gt;<br />
add<br />
&lt;input type=&#8221;radio&#8221; name=&#8221;calculate&#8221; value=&#8221;sub&#8221;  /&gt;<br />
sub<br />
&lt;input type=&#8221;radio&#8221; name=&#8221;calculate&#8221;  value=&#8221;mul&#8221;/&gt;<br />
mul<br />
&lt;/p&gt;<br />
&lt;input type=&#8221;submit&#8221; name=&#8221;submit&#8221; value=&#8221;calculate&#8221;/&gt;<br />
&lt;/form&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p>
<p>[/php]</p>
<p>It displays the output as:<br />
Value 1: <input name="val1" size="7" type="text" />Value 2: <input name="val2" size="7" type="text" /><br />
<input name="calculate" type="radio" value="add" />add<br />
<input name="calculate" type="radio" value="sub" />sub<br />
<input name="calculate" type="radio" value="mul" />mul<br />
<input name="submit" type="submit" value="calculate" /></p>
<form action="calculation.php" method="post"><strong>calculation.php:</strong></form>
<form action="calculation.php" method="post">[php]<br />
&lt;/form&gt;&lt;form action=&#8221;calculation.php&#8221; method=&#8221;post&#8221;&gt;&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;<br />
&lt;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221;&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html; charset=iso-8859-1&#8243; /&gt;<br />
&lt;title&gt;Untitled Document&lt;/title&gt;<br />
&lt;/head&gt;&lt;body&gt;<br />
&lt;?php<br />
if(($_POST[&#8216;val1&#8217;]==&#8221;&#8221;) || ($_POST[&#8216;val2&#8217;]==&#8221;&#8221;))<br />
{<br />
header(&#8220;location: calculate.html&#8221;);<br />
exit();<br />
}<br />
if($_POST[&#8216;calculate&#8217;]==&#8221;add&#8221;)<br />
{<br />
$result=$_POST[&#8216;val1&#8217;]+$_POST[&#8216;val2&#8217;];<br />
}<br />
else if($_POST[&#8216;calculate&#8217;]==&#8221;sub&#8221;)<br />
{<br />
$result=$_POST[&#8216;val1&#8217;]-$_POST[&#8216;val2&#8217;];<br />
}<br />
else if($_POST[&#8216;calculate&#8217;]==&#8221;mul&#8221;)<br />
{<br />
$result=$_POST[&#8216;val1&#8217;]*$_POST[&#8216;val2&#8217;];<br />
}<br />
echo &#8220;Calculation is: $result&#8221;;<br />
?&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;&lt;/form&gt;&lt;form action=&#8221;calculation.php&#8221; method=&#8221;post&#8221;&gt;<br />
[/php]</form>
<form action="calculation.php" method="post">An example output for add by giving the input as value1 as 5 and value2 as 5 is:</form>
<form action="calculation.php" method="post">Calculation is: 10</form>
<form action="calculation.php" method="post"></form>
]]></content:encoded>
					
					<wfw:commentRss>https://www.searchenginegenie.com/programming-blog/calculate-addsubmul-using-php/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Transfer data from one page to another using php</title>
		<link>https://www.searchenginegenie.com/programming-blog/phphtml-to-connect-two-tables/</link>
					<comments>https://www.searchenginegenie.com/programming-blog/phphtml-to-connect-two-tables/#comments</comments>
		
		<dc:creator><![CDATA[Camilla]]></dc:creator>
		<pubDate>Wed, 28 Jul 2010 05:58:55 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[JavaScript.]]></category>
		<category><![CDATA[PHP Code]]></category>
		<guid isPermaLink="false">http://www.searchenginegenie.com/programming-blog/?p=306</guid>

					<description><![CDATA[Steps: 1:Create new php file and copy file1 code and save it as file1.php. 2.Create another new php file and copy file2 code and save it as file2.php. 3.Run file1.php, then it will display the file1 data. 4.Enter your name, age and location and press the submit button. 5.It will transfer to file2.php and displays [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong>Steps:</strong></p>
<p><strong>1:Create new php file and copy file1 code and save it as file1.php.</strong></p>
<p><strong>2.Create another new php file and copy file2 code and save it as file2.php.</strong></p>
<p><strong>3.Run file1.php, then it will display the file1 data.</strong></p>
<p><strong>4.Enter your name, age and location and press the submit button.</strong></p>
<p><strong>5.It will transfer to file2.php and displays the output.</strong></p>
<p><strong> file1:</strong></p>
<p>[php]</p>
<p>&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;<br />
 &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;<br />
 &lt;head&gt;<br />
 &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot; /&gt;<br />
 &lt;title&gt;table1&lt;/title&gt;<br />
 &lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot;&gt;<br />
 function check()<br />
 {<br />
 if(document.getElementById(&#8216;name1&#8217;).value==&#8221;)<br />
 {<br />
 alert(&quot;Please enter your name&quot;);<br />
 document.getElementById(&#8216;name1&#8217;).focus();<br />
 }<br />
 else if(document.getElementById(&#8216;age1&#8217;).value==&#8221;)<br />
 {<br />
 alert(&quot;please enter your age&quot;);<br />
 document.getElementById(&#8216;age1&#8217;).focus();<br />
 }<br />
 else if(document.getElementById(&#8216;location1&#8217;).value==&#8221;)<br />
 {<br />
 alert(&quot;please enter the location&quot;);<br />
 document.getElementById(&#8216;location1&#8217;).focus();<br />
 }<br />
 else<br />
 {<br />
 document.form.submit();<br />
 }<br />
 }<br />
 &lt;/script&gt;<br />
 &lt;/head&gt;</p>
<p>&lt;body&gt;<br />
 &lt;form method=&quot;post&quot; action=&quot;file2.php&quot; name=&quot;form&quot; &gt;<br />
 &lt;table width=&quot;100%&quot; border=&quot;0&quot;&gt;<br />
 &lt;tr&gt;<br />
 &lt;td&gt;&lt;label&gt;Enter your name: &lt;/label&gt;<br />
 &lt;/td&gt;<br />
 &lt;td&gt;&lt;input type=&quot;text&quot; name=&quot;name&quot;  id=&quot;name1&quot;; /&gt;<br />
 &lt;/td&gt;<br />
 &lt;/tr&gt;<br />
 &lt;tr&gt;<br />
 &lt;td&gt;&lt;label&gt;Enter your age:&lt;/label&gt;<br />
 &lt;/td&gt;<br />
 &lt;td&gt;&lt;input type=&quot;text&quot; name=&quot;age&quot; id=&quot;age1&quot;; /&gt;<br />
 &lt;/td&gt;<br />
 &lt;/tr&gt;<br />
 &lt;tr&gt;<br />
 &lt;td&gt;&lt;label&gt;Enter the location:&lt;/label&gt;<br />
 &lt;/td&gt;<br />
 &lt;td&gt;&lt;input type=&quot;text&quot; name=&quot;location&quot; id=&quot;location1&quot;; /&gt;<br />
 &lt;/td&gt;<br />
 &lt;/tr&gt;<br />
 &lt;tr&gt;<br />
 &lt;td colspan=&quot;2&quot;&gt; &lt;div align=&quot;center&quot;&gt;<br />
 &lt;input type=&quot;button&quot; value=&quot;Submit&quot; onclick=&quot;check();&quot; name=&quot;Submit&quot; /&gt;</p>
<p>&lt;/div&gt;&lt;/td&gt;<br />
 &lt;/tr&gt;<br />
 &lt;/table&gt;<br />
 &lt;/form&gt;<br />
 &lt;/body&gt;<br />
 &lt;/html&gt;</p>
<p>[/php]</p>
<p><strong>//save this as file1.php</strong></p>
<p><strong><script type="text/javascript">// <![CDATA[
function check()
{
    if(document.getElementById('name1').value=='')
	{
        alert("Please enter your name");
		document.getElementById('name1').focus();
    }
	else if(document.getElementById('age1').value=='')
	{
		alert("please enter your age");
		document.getElementById('age1').focus();
	}
	else if(document.getElementById('location1').value=='')
	{
		alert("please enter the location");
		document.getElementById('location1').focus();
	}
	else
	{
     document.form.submit();
    }
}
// ]]&gt;</script></strong></p>
<p><strong>It will display the output as:</strong></p>
<form action="table2.php" method="post">
<table width="100%" border="0">
<tbody>
<tr>
<td class="text"><label>Enter your name: </label></td>
<td><input id="name1" type="text" name="name" /></td>
</tr>
<tr>
<td class="text"><label>Enter your age:</label></td>
<td><input id="age1" type="text" name="age" /></td>
</tr>
<tr>
<td class="text"><label>Enter the location:</label></td>
<td><input id="location1" type="text" name="location" /></td>
</tr>
<tr>
<td colspan="2">
<div><input onclick="check();" type="button" name="Submit" value="Submit" /></div>
</td>
</tr>
</tbody>
</table>
</form>
<p><strong>file2:</strong></p>
<p>[php]</p>
<p>&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;<br />
 &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;<br />
 &lt;head&gt;<br />
 &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot; /&gt;<br />
 &lt;title&gt;table2&lt;/title&gt;<br />
 &lt;/head&gt;</p>
<p>&lt;body&gt;<br />
 &lt;?php<br />
 $var1=$_POST[&#8216;name&#8217;];<br />
 $var2=$_POST[&#8216;age&#8217;];<br />
 $var3=$_POST[&#8216;location&#8217;];<br />
 echo &quot;your name is: $var1&quot;.&quot;&lt;br/&gt;&quot;;<br />
 echo &quot;your age is: $var2&quot;.&quot;&lt;br/&gt;&quot;;<br />
 echo &quot;loaction is: $var3&quot;;<br />
 ?&gt;<br />
 &lt;/body&gt;<br />
 &lt;/html&gt;</p>
<p>[/php]</p>
<p><strong>//save this as file2.php</strong></p>
<p><strong>after entering your name, age and location and pressing the submit button, it displays the output.</strong></p>
<p><strong>For example:</strong></p>
<p><strong>your name is: John<br />
your age is: 25<br />
loaction is: CA</strong></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.searchenginegenie.com/programming-blog/phphtml-to-connect-two-tables/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>To display the current day and image for a particular day</title>
		<link>https://www.searchenginegenie.com/programming-blog/to-display-the-current-day-and-image-for-a-particular-day/</link>
					<comments>https://www.searchenginegenie.com/programming-blog/to-display-the-current-day-and-image-for-a-particular-day/#respond</comments>
		
		<dc:creator><![CDATA[Camilla]]></dc:creator>
		<pubDate>Fri, 23 Jul 2010 04:45:47 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[PHP Code]]></category>
		<guid isPermaLink="false">http://www.searchenginegenie.com/programming-blog/?p=268</guid>

					<description><![CDATA[[php] &#60;?php $today=date(l); if($today==Monday) { echo &#34;Today is Monday&#34; .&#34;&#60;br/&#62;&#34;; echo &#34;&#60;img src=&#8217;images/image1.gif&#8217;&#62;&#34;; } elseif($today==Tuesday) { echo &#34;Today is Tussday&#34; .&#34;&#60;br/&#62;&#34;; echo &#34;&#60;img src=&#8217;images/image2.gif&#8217;&#62;&#34;; } elseif($today==Wedsday) { echo &#34;Today is Wedsday&#34; .&#34;&#60;br/&#62;&#34;; echo &#34;&#60;img src=&#8217;images/image3.gif&#8217;&#62;&#34;; } elseif($today==Thursday) { echo &#34;Today is Thursday&#34; .&#34;&#60;br/&#62;&#34;; echo &#34;&#60;img src=&#8217;images/image4.gif&#8217;&#62;&#34;; } elseif($today==Friday){ echo &#34;Today is Friday&#34;.&#34;&#60;br/&#62;&#34;; echo &#34;&#60;img src=&#8217;images/image5.gif&#8217;&#62;&#34;; [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>[php]<br />
&lt;?php<br />
 $today=date(l);<br />
 if($today==Monday)<br />
 {<br />
 echo &quot;Today is Monday&quot; .&quot;&lt;br/&gt;&quot;;<br />
 echo &quot;&lt;img src=&#8217;images/image1.gif&#8217;&gt;&quot;;<br />
 }<br />
 elseif($today==Tuesday)<br />
 {<br />
 echo &quot;Today is Tussday&quot; .&quot;&lt;br/&gt;&quot;;<br />
 echo &quot;&lt;img src=&#8217;images/image2.gif&#8217;&gt;&quot;;<br />
 }<br />
 elseif($today==Wedsday)<br />
 {<br />
 echo &quot;Today is Wedsday&quot; .&quot;&lt;br/&gt;&quot;;<br />
 echo &quot;&lt;img src=&#8217;images/image3.gif&#8217;&gt;&quot;;<br />
 }<br />
 elseif($today==Thursday)<br />
 {<br />
 echo &quot;Today is Thursday&quot; .&quot;&lt;br/&gt;&quot;;<br />
 echo &quot;&lt;img src=&#8217;images/image4.gif&#8217;&gt;&quot;;<br />
 }</p>
<p>elseif($today==Friday){<br />
 echo &quot;Today is Friday&quot;.&quot;&lt;br/&gt;&quot;;<br />
 echo &quot;&lt;img src=&#8217;images/image5.gif&#8217;&gt;&quot;;<br />
 }</p>
<p>elseif($today==Saturday){<br />
 echo &quot;Today is Saturday&quot;.&quot;&lt;br/&gt;&quot;;<br />
 echo &quot;&lt;img src=&#8217;images/image6.gif&#8217;&gt;&quot;;<br />
 }</p>
<p>elseif($today==Sunday){<br />
 echo &quot;Today is Sunday&quot;.&quot;&lt;br/&gt;&quot;;<br />
 echo &quot;&lt;img src=&#8217;images/image7.gif&#8217;&gt;&quot;;<br />
 }<br />
 ?&gt;<br />
[/php]</p>
<p>//create the folder name as images and store the 7 images. So, it will display the todays image.</p>
<p>It display the output as:</p>
<p>Today is Friday</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.searchenginegenie.com/programming-blog/to-display-the-current-day-and-image-for-a-particular-day/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>To display current date,no.of days and weeks in a month and year using php</title>
		<link>https://www.searchenginegenie.com/programming-blog/to-display-current-dateno-of-days-and-weeks-in-a-month-and-year/</link>
					<comments>https://www.searchenginegenie.com/programming-blog/to-display-current-dateno-of-days-and-weeks-in-a-month-and-year/#respond</comments>
		
		<dc:creator><![CDATA[Camilla]]></dc:creator>
		<pubDate>Fri, 23 Jul 2010 04:30:16 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[PHP Code]]></category>
		<guid isPermaLink="false">http://www.searchenginegenie.com/programming-blog/?p=264</guid>

					<description><![CDATA[1:Create new php file and copy the code and save it as file1.php. 2.Run file1.php, then it will display the current date and no.of days,weeks in a month and year. [php] &#60;?php echo  &#34;My name is: John&#34;.&#34;&#60;br/&#62;&#34;; echo &#34;current date is:&#34;.&#34;\n&#34; .date(&#34;Y m d h: s: m&#34;) .&#34;&#60;br/&#62;&#34;; echo &#34;No of days in a month:&#34;.&#34;\n&#34; [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong>1:Create new php file and copy the code and save it as file1.php.</strong></p>
<p><strong>2.Run file1.php, then it will display the current date and no.of days,weeks in a month and year.</strong></p>
<p>[php]<br />
&lt;?php<br />
 echo  &quot;My name is: John&quot;.&quot;&lt;br/&gt;&quot;;<br />
 echo &quot;current date is:&quot;.&quot;\n&quot; .date(&quot;Y m d h: s: m&quot;) .&quot;&lt;br/&gt;&quot;;<br />
 echo &quot;No of days in a month:&quot;.&quot;\n&quot; .cal_days_in_month( CAL_GREGORIAN, 07, 2010) .&quot;&lt;br/&gt;&quot;;<br />
 echo &quot;No of weeks in a month:&quot;.&quot;\n&quot;.date(&quot;w&quot;, mktime(0,0,0,12,31,2010)) .&quot;&lt;br/&gt;&quot;;<br />
 echo &quot;No of weeks in a year:&quot;.&quot;\n&quot; .date(&quot;W&quot;, mktime(0,0,0,12,31,2010)) .&quot;&lt;br/&gt;&quot;;<br />
 ?&gt;<br />
[/php]</p>
<p><strong>It display the output as:</strong></p>
<p><strong>My name is: John<br />
current date is: 2010 07 23 04: 46: 07<br />
No of days in a month: 31<br />
No of weeks in a month: 5<br />
No of weeks in a year: 52</strong></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.searchenginegenie.com/programming-blog/to-display-current-dateno-of-days-and-weeks-in-a-month-and-year/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Php code to find leap year or not</title>
		<link>https://www.searchenginegenie.com/programming-blog/php-code-to-find-leap-year-or-not/</link>
					<comments>https://www.searchenginegenie.com/programming-blog/php-code-to-find-leap-year-or-not/#respond</comments>
		
		<dc:creator><![CDATA[Camilla]]></dc:creator>
		<pubDate>Tue, 07 Jul 2009 06:15:00 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP Code]]></category>
		<guid isPermaLink="false">http://www.searchenginegenie.com/programming-blog/php-code-to-find-leap-year-or-not/</guid>

					<description><![CDATA[We can find a year is leap year or not in various ways.we can use the following fuctions in php. By using date() function By Modulus operator Here is a sample php code that uses modulus(%)operator for finding the leap year. Write the below code within php tags [php] &#60;code&#62; &#60;!&#8211;?PHP &#60;/p&#8211;&#62; &#60;/code&#62; &#60;code&#62;$start = [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>We can find a year is leap year or not in various ways.we can use the following fuctions in php.</p>
<ul>
<li>By using date() function</li>
<li>By Modulus operator</li>
</ul>
<p>Here is a sample php code that uses modulus(%)operator for finding the leap year.</p>
<p>Write the below code within php tags</p>
<p>[php]<br />
&lt;code&gt;<br />
 &lt;!&#8211;?PHP &lt;/p&#8211;&gt; &lt;/code&gt;</p>
<p>&lt;code&gt;$start = 1000;<br />
 $end = 1011;<br />
 for($i = $start; $i &lt; $end; $i++)<br />
 {<br />
 if(($i%4) == 0){$val = &quot;Leap Year&quot;;}else{$val = &quot;Not Leap Year&quot;;}<br />
 echo $i, &#8216; &#8212;&gt; &#8216;.$val.&#8221;;<br />
 }&lt;/code&gt;</p>
<p>?&gt;<br />
[/php]</p>
<p>It will produce the output as given below.</p>
<p>1000 &#8212;&gt; Leap Year<br />
1001 &#8212;&gt; Not Leap Year<br />
1002 &#8212;&gt; Not Leap Year<br />
1003 &#8212;&gt; Not Leap Year<br />
1004 &#8212;&gt; Leap Year<br />
1005 &#8212;&gt; Not Leap Year<br />
1006 &#8212;&gt; Not Leap Year<br />
1007 &#8212;&gt; Not Leap Year<br />
1008 &#8212;&gt; Leap Year<br />
1009 &#8212;&gt; Not Leap Year<br />
1010 &#8212;&gt; Not Leap Year</p>
<p>You find leap years for any year ranges by changing the $start and $end.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.searchenginegenie.com/programming-blog/php-code-to-find-leap-year-or-not/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>CGI Time Out The specified CGI application exceeded the allowed time for processing. The server has deleted the process.</title>
		<link>https://www.searchenginegenie.com/programming-blog/cgi-time-out-issue/</link>
					<comments>https://www.searchenginegenie.com/programming-blog/cgi-time-out-issue/#respond</comments>
		
		<dc:creator><![CDATA[Camilla]]></dc:creator>
		<pubDate>Thu, 04 Sep 2008 12:21:00 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP Code]]></category>
		<guid isPermaLink="false">http://www.searchenginegenie.com/programming-blog/cgi-time-out-issue/</guid>

					<description><![CDATA[Whenever we tried to run some large script like data extraction or trying to get thousand number of records from remote database, most of us will face the following CGI Issue &#8220;The specified CGI application exceeded the allowed time for processing. The server has deleted the&#8230;&#8221; In order to run your script without any such [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Whenever we tried to run some large script like data extraction or trying to get thousand number of records from remote database, most of us will face the following CGI Issue</p>
<p>&#8220;The specified CGI application exceeded the allowed time for processing. The server has deleted the&#8230;&#8221;</p>
<p>In order to run your script without any such kind of issue, please follow the steps provided below. Earlier I too faced such a issue but after research in my PC I finally fixed it.</p>
<p>Note: the following steps is only suitable only for the Windows XP and with the IIS version 5.1:</p>
<p>Go to your Internet Information Services (IIS) page (Go Start -&gt; Settings -&gt; Control Panel -&gt; Administrative tools -&gt; Internet Information services)</p>
<p>Unfold Websites-&gt;Default Web site</p>
<p>Now right click on your website name (on which you are executing your script)</p>
<p>Select Properties</p>
<p>Select the tab Virtual Directory</p>
<p>In that page, select the option High (Isolated) under Application Protection, this option will remove the default timeout settings.</p>
<p>Now click on the button Configuration</p>
<p>Then select Process Options tab</p>
<p>Change the CGI Script Timeout value max value is 999999.</p>
<p>That&#8217;s it. You may now run your script without any issue.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.searchenginegenie.com/programming-blog/cgi-time-out-issue/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/

Page Caching using Disk: Enhanced 
Minified using Disk

Served from: www.searchenginegenie.com @ 2024-11-22 08:15:08 by W3 Total Cache
-->