<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>PHP Freelancer</title>
	
	<link>http://php-freelancer.in</link>
	<description />
	<lastBuildDate>Mon, 09 Aug 2010 18:52:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/PhpFreelancer" /><feedburner:info uri="phpfreelancer" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>PhpFreelancer</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Disable View From Controller Or Controller Function Without View in CakePHP</title>
		<link>http://feedproxy.google.com/~r/PhpFreelancer/~3/4FdtIpg3txs/</link>
		<comments>http://php-freelancer.in/2010/08/09/disable-view-from-controller-or-controller-function-without-view-in-cakephp/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 18:52:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Disable View From Controller]]></category>

		<guid isPermaLink="false">http://php-freelancer.in/?p=140</guid>
		<description><![CDATA[TweetHi Friends, today I am going to explain you one simple thing for which I have searched more than one hour. I wanted to make one controller and one function in it which don&#8217;t have view file for it.I have search for it so many times and finally I got it from one forum where [...]]]></description>
			<content:encoded><![CDATA[<div class="igit_tsb_button" style="float: left; margin-right: 10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F08%2F09%2Fdisable-view-from-controller-or-controller-function-without-view-in-cakephp%2F&amp;text=Disable+View+From+Controller+Or+Controller+Function+Without+View+in+CakePHP&amp;count=vertical&amp;via=hackingethics" style="" class="twitter-share-button">Tweet</a></div><p><a href="http://php-freelancer.in/wp-content/uploads/2010/04/CakePHP_img.png"><img class="alignright size-full wp-image-73" title="CakePHP_img" src="http://php-freelancer.in/wp-content/uploads/2010/04/CakePHP_img.png" alt="" width="83" height="83" /></a>Hi Friends, today I am going to explain you one simple thing for which I have searched more than one hour. I wanted to make one controller and one function in it which don&#8217;t have view file for it.I have search for it so many times and finally I got it from one forum where they write that how can we disable or not include view for controller function<span id="more-140"></span>.</p>
<p>If you want to disable or not render or want to write controller function without view file then below is the one line code by which you can disable view by writing it in function :</p>
<p><code>$this-&gt;autoRender = false;</code></p>
<p>Just write this line where you want to disable view.
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F08%2F09%2Fdisable-view-from-controller-or-controller-function-without-view-in-cakephp%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F08%2F09%2Fdisable-view-from-controller-or-controller-function-without-view-in-cakephp%2F&amp;source=hackingethics&amp;style=compact" height="61" width="50" /><br />
			</a>
		</div>
<img src="http://feeds.feedburner.com/~r/PhpFreelancer/~4/4FdtIpg3txs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://php-freelancer.in/2010/08/09/disable-view-from-controller-or-controller-function-without-view-in-cakephp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://php-freelancer.in/2010/08/09/disable-view-from-controller-or-controller-function-without-view-in-cakephp/</feedburner:origLink></item>
		<item>
		<title>Remove index.php From URL By URL Rewriting Or htaccess Rule To Remove Index.php</title>
		<link>http://feedproxy.google.com/~r/PhpFreelancer/~3/geKgBjdAXSw/</link>
		<comments>http://php-freelancer.in/2010/08/04/remove-index-php-from-url-by-url-rewriting-or-htaccess-rule-to-remove-index-php/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 17:11:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[Remove index.php From URL By URL Rewriting]]></category>

		<guid isPermaLink="false">http://php-freelancer.in/?p=135</guid>
		<description><![CDATA[TweetHello Friends, Today i was working on one project in which I have to remove index.php from URL because http://example.com/index.php and http://example.com/ both are same but technically google consider it different URLs, There is one other method by which we can tell google about one best URL which is canonical tag. But I want to [...]]]></description>
			<content:encoded><![CDATA[<div class="igit_tsb_button" style="float: left; margin-right: 10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F08%2F04%2Fremove-index-php-from-url-by-url-rewriting-or-htaccess-rule-to-remove-index-php%2F&amp;text=Remove+index.php+From+URL+By+URL+Rewriting+Or+htaccess+Rule+To+Remove+Index.php&amp;count=vertical&amp;via=hackingethics" style="" class="twitter-share-button">Tweet</a></div><p><a href="http://php-freelancer.in/wp-content/uploads/2010/08/illu_htaccess.gif"><img class="alignright size-thumbnail wp-image-137" title="illu_htaccess" src="http://php-freelancer.in/wp-content/uploads/2010/08/illu_htaccess-150x150.gif" alt="" width="150" height="150" /></a>Hello Friends, Today i was working on one project in which I have to remove index.php from URL because http://example.com/index.php and http://example.com/ both are same but technically google consider it different URLs, There is one other method by which we can tell google about one best URL which is canonical tag. But I want to do it via URL rewriting and remove index.php from URL means when anyone enters http://example.com/index.php it redirects to http://example.com/ , I have searched alot and finally I found it So i thought it would be great if I share it on this site, So it can be helpful to someone<span id="more-135"></span>.</p>
<p>Below is the rule of .htaccess by which you can remove index.php from URL means if anyone enters http://example.com/index.php it redirects to http://example.com/.</p>
<p><code>RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /([^/]+/)*index.php HTTP/<br />
RewriteRule ^(([^/]+/)*)index.php$ http://www.%{HTTP_HOST}/ [R=301,NS,L]</code></p>
<p>Above are the two rules by which you can redirect index.php to root directory. If you have any problems in these rules then you can contact me or post it into comments.
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F08%2F04%2Fremove-index-php-from-url-by-url-rewriting-or-htaccess-rule-to-remove-index-php%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F08%2F04%2Fremove-index-php-from-url-by-url-rewriting-or-htaccess-rule-to-remove-index-php%2F&amp;source=hackingethics&amp;style=compact" height="61" width="50" /><br />
			</a>
		</div>
<img src="http://feeds.feedburner.com/~r/PhpFreelancer/~4/geKgBjdAXSw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://php-freelancer.in/2010/08/04/remove-index-php-from-url-by-url-rewriting-or-htaccess-rule-to-remove-index-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://php-freelancer.in/2010/08/04/remove-index-php-from-url-by-url-rewriting-or-htaccess-rule-to-remove-index-php/</feedburner:origLink></item>
		<item>
		<title>New DreamHost July Month Coupon Code – 55$ Off</title>
		<link>http://feedproxy.google.com/~r/PhpFreelancer/~3/oWeF6lDnZyY/</link>
		<comments>http://php-freelancer.in/2010/07/15/new-dreamhost-july-month-coupon-code-55-off/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 06:34:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coupon Codes]]></category>
		<category><![CDATA[DreamHost Coupon Code]]></category>

		<guid isPermaLink="false">http://php-freelancer.in/?p=131</guid>
		<description><![CDATA[TweetHello Friends, There are so many good hosting services on internet and DreamHost is one of the best hosting service of them. On internet you will found so many coupon codes having 50$ off on hosting of dreamhost or 40$ off on dreamhost hosting but today PHP Freelancer brings you coupon code for dreamhost which [...]]]></description>
			<content:encoded><![CDATA[<div class="igit_tsb_button" style="float: left; margin-right: 10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F07%2F15%2Fnew-dreamhost-july-month-coupon-code-55-off%2F&amp;text=New+DreamHost+July+Month+Coupon+Code+-+55%24+Off&amp;count=vertical&amp;via=hackingethics" style="" class="twitter-share-button">Tweet</a></div><p><a href="http://php-freelancer.in/wp-content/uploads/2010/07/a76d0a8f5dcc03ecdf6d7707c3ee00a2.jpg"><img class="alignright size-full wp-image-132" title="Dreamhost Coupon Code" src="http://php-freelancer.in/wp-content/uploads/2010/07/a76d0a8f5dcc03ecdf6d7707c3ee00a2.jpg" alt="" width="70" height="70" /></a>Hello Friends, There are so many good hosting services on internet and <strong>DreamHost </strong>is one of the best hosting service of them. On internet you will found so many coupon codes having<strong> 50$ off </strong>on hosting of <strong>dreamhost </strong>or <strong>40$ off</strong> on dreamhost hosting but today<strong> PHP Freelancer </strong>brings you coupon code for <strong>dreamhost </strong>which is having 55$ off on one year hosting and one domain for one year absolutely free<span id="more-131"></span>.</p>
<p>I primarily chose <strong>Dreamhost </strong>due to the cheap webhosting yet powerful feature rich package they offered. But over time, I have come to love <strong>dreamhost </strong>for several more reasons I want to share with you .</p>
<p>In between if you don&#8217;t want to read further and want to buy hosting then click on below link and it will take you to signup page and at time of signup you dont have to enter coupon code because it will automatically deduct 55$ from original prize and you will get 55$ discount for one year hosting and also one domain free with hosting.</p>
<p><span style="color: #ff0000;"><strong>NOTE : This Coupon Code will Expire on 1st August, 2010.</strong></span></p>
<h1 style="text-align: center; padding-bottom: 40px; width: 100%;"><a style="padding: 5px; background-color: #78af15; color: #ffffff;" title="Get $55 Discount Coupon Code Of DreamHost" href="http://www.dreamhost.com/r.cgi?609919|JULYHE2010" target="_blank"><span style="text-decoration: underline;">Get $55 Discount Coupon Code</span></a></h1>
<p><strong>FEATURES :</strong></p>
<p><strong>1. Excellent Customer Support</strong></p>
<p><strong>2. Unlimited bandwidth and Storage Space</strong></p>
<p><strong>3. One click Installations and Upgrades</strong></p>
<p><strong>4. Host Unlimited Domains, Subdomains, Databases</strong></p>
<p><strong>5. Neat and Easy Control Panel</strong></p>
<p><strong>6. Maximum Power Features You Need</strong></p>
<p><strong>7. Dreamhost Status Notifications</strong></p>
<p><strong>8. 97-day money back guarantee on all plans</strong></p>
<p><strong>9. Top company hosting 850,000 domains</strong></p>
<p>Apart from these there are so many reasons or advantages to use dreamhost.</p>
<p><strong>What is the original prize of hosting plan and how much discount I am getting?</strong></p>
<p>- Dreamhost hosting plan price is 119.40 but if you use our promo code they will give you 55$ off on 119.40$ and also one free domain for a year.So you will get one year hosting with one year free domain in only 64$.</p>
<p>Below are some of the features you will get with dreamhost hosting plan.</p>
<p><strong>Disk Storage -</strong> Unlimited TB   + 50GB Backups</p>
<p><strong>Monthly Bandwidth -</strong> Unlimited TB</p>
<p><strong>Domains Hosted -</strong> Unlimited</p>
<p><strong>Full Shell / SSH / FTP / SFTP Users -</strong> Unlimited</p>
<p><strong>E-Mail Accounts (POP/IMAP/Webmail) -</strong> Unlimited</p>
<p><strong>MySQL 5 Databases -</strong> Unlimited</p>
<p><strong>Operating System -</strong> Debian Linux</p>
<p>So below are the link to get coupon code for 55$ on dreamhost plan.Just click link below and signup for hosting plan you dont need to enter any coupon code, it will take automatically this coupon code if you are going through this link.</p>
<h1 style="text-align: center; padding-bottom: 40px; width: 100%;"><a style="padding: 5px; background-color: #78af15; color: #ffffff;" title="Get $55 Discount Coupon Code" href="http://www.dreamhost.com/r.cgi?609919|JULYHE2010" target="_blank"><span style="text-decoration: underline;">Get $55 Discount Coupon Code</span></a></h1>
<p>Let me know if you have any problem with this coupon code.
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F07%2F15%2Fnew-dreamhost-july-month-coupon-code-55-off%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F07%2F15%2Fnew-dreamhost-july-month-coupon-code-55-off%2F&amp;source=hackingethics&amp;style=compact" height="61" width="50" /><br />
			</a>
		</div>
<img src="http://feeds.feedburner.com/~r/PhpFreelancer/~4/oWeF6lDnZyY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://php-freelancer.in/2010/07/15/new-dreamhost-july-month-coupon-code-55-off/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://php-freelancer.in/2010/07/15/new-dreamhost-july-month-coupon-code-55-off/</feedburner:origLink></item>
		<item>
		<title>How To Convert Javascript Array To String</title>
		<link>http://feedproxy.google.com/~r/PhpFreelancer/~3/wSz-8wDVNJg/</link>
		<comments>http://php-freelancer.in/2010/07/08/how-to-convert-javascript-array-to-string/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 07:13:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Convert Javascript array to String]]></category>

		<guid isPermaLink="false">http://php-freelancer.in/?p=126</guid>
		<description><![CDATA[TweetHi Friends, In last article I have explained that how can we get checked check box values by jquery in array. Now if we want to convert that javascript array to string to use it in php So there is very simple way to do this. We can&#8217;t use js array in PHP as PHP [...]]]></description>
			<content:encoded><![CDATA[<div class="igit_tsb_button" style="float: left; margin-right: 10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F07%2F08%2Fhow-to-convert-javascript-array-to-string%2F&amp;text=How+To+Convert+Javascript+Array+To+String&amp;count=vertical&amp;via=hackingethics" style="" class="twitter-share-button">Tweet</a></div><p><a href="http://php-freelancer.in/wp-content/uploads/2010/07/application_javascript.png"><img class="alignright size-full wp-image-127" title="application_javascript" src="http://php-freelancer.in/wp-content/uploads/2010/07/application_javascript.png" alt="" width="128" height="128" /></a>Hi Friends, In last article I have explained that how can we get checked check box values by jquery in array. Now if we want to convert that javascript array to string to use it in php So there is very simple way to do this. We can&#8217;t use js array in PHP as PHP array so we can convert it to string and then use that string in php<span id="more-126"></span>.</p>
<p>Suppose for example exclude_category is javascript array which we want to convert in string to use it in PHP, So below is the way by which we can do it</p>
<p><code>var arv = exclude_category.toString();</code></p>
<p>toString is js function by which we can convert any js array to string. So now in arv we will get converted string from js array. let me know if you need any help in this.
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F07%2F08%2Fhow-to-convert-javascript-array-to-string%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F07%2F08%2Fhow-to-convert-javascript-array-to-string%2F&amp;source=hackingethics&amp;style=compact" height="61" width="50" /><br />
			</a>
		</div>
<img src="http://feeds.feedburner.com/~r/PhpFreelancer/~4/wSz-8wDVNJg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://php-freelancer.in/2010/07/08/how-to-convert-javascript-array-to-string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://php-freelancer.in/2010/07/08/how-to-convert-javascript-array-to-string/</feedburner:origLink></item>
		<item>
		<title>How To Get Checked Check Boxes Values By jQuery</title>
		<link>http://feedproxy.google.com/~r/PhpFreelancer/~3/Yt6z1G6iOts/</link>
		<comments>http://php-freelancer.in/2010/07/08/how-to-get-checked-check-boxes-values-by-jquery/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 06:52:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[get checked checkbox values by jquery]]></category>

		<guid isPermaLink="false">http://php-freelancer.in/?p=123</guid>
		<description><![CDATA[TweetHi Friends, Some days ago I was trying to take checked values of checkboxes via jQuery while using jQuery Ajax. I tried to find out on internet about how to get checked checkbox values and I found so many articles but didn&#8217;t find any clear code which is working good, So i have  tried it [...]]]></description>
			<content:encoded><![CDATA[<div class="igit_tsb_button" style="float: left; margin-right: 10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F07%2F08%2Fhow-to-get-checked-check-boxes-values-by-jquery%2F&amp;text=How+To+Get+Checked+Check+Boxes+Values+By+jQuery&amp;count=vertical&amp;via=hackingethics" style="" class="twitter-share-button">Tweet</a></div><p><a href="http://php-freelancer.in/wp-content/uploads/2010/04/jquery.gif"><img class="alignright size-full wp-image-77" title="jqueryimg" src="http://php-freelancer.in/wp-content/uploads/2010/04/jquery.gif" alt="" width="50" height="50" /></a>Hi Friends, Some days ago I was trying to take checked values of checkboxes via jQuery while using jQuery Ajax. I tried to find out on internet about how to get checked checkbox values and I found so many articles but didn&#8217;t find any clear code which is working good, So i have  tried it myself by taking reference from jquery site and finally I have done this so I thought to share it with my readers.So below is the explanation how to get checked checkboxes values by jQuery<span id="more-123"></span>.</p>
<p>First of all suppose we have 3 checkboxes as given below:</p>
<p><code> </code></p>
<p><code></p>
<div id="_mcePaste">&lt;input id="in-category-1" name="post_category[]" type="checkbox" value="1" /&gt;CakePHP</div>
<div id="_mcePaste">&lt;input id="in-category-2" name="post_category[]" type="checkbox" value="2" /&gt;jQuery</div>
<div id="_mcePaste">&lt;input id="in-category-3" name="post_category[]" type="checkbox" value="3" /&gt;Open Source</div>
<p></code></p>
<p>Here you will see I have taken checkbox name as array. Now when you want to take value of checked checkbox then you can do it by jquery code given below :</p>
<p><code>$(':checkbox:checked').each(function(i){<br />
<span style="white-space: pre;"> </span>i = parseInt(i);<br />
<span style="white-space: pre;"> </span>if($(this).attr('name') == "post_category[]")<br />
<span style="white-space: pre;"> </span>{<span style="white-space: pre;"> </span><br />
<span style="white-space: pre;"> </span>exclude_category[i] = $(this).val();<br />
<span style="white-space: pre;"> </span>}<br />
<span style="white-space: pre;"> </span>i++;<span style="white-space: pre;"><br />
</span> <span style="white-space: pre;"> </span>});</code></p>
<p>By above code you can take value of checked checkboxes in exclude_category javascript variable. So you can alert exclude_category and check that values. Let me know if you have any questions regarding this.
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F07%2F08%2Fhow-to-get-checked-check-boxes-values-by-jquery%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F07%2F08%2Fhow-to-get-checked-check-boxes-values-by-jquery%2F&amp;source=hackingethics&amp;style=compact" height="61" width="50" /><br />
			</a>
		</div>
<img src="http://feeds.feedburner.com/~r/PhpFreelancer/~4/Yt6z1G6iOts" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://php-freelancer.in/2010/07/08/how-to-get-checked-check-boxes-values-by-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://php-freelancer.in/2010/07/08/how-to-get-checked-check-boxes-values-by-jquery/</feedburner:origLink></item>
		<item>
		<title>How To Make Link On Image In CakePHP</title>
		<link>http://feedproxy.google.com/~r/PhpFreelancer/~3/wy_XXjQL3r8/</link>
		<comments>http://php-freelancer.in/2010/06/25/how-to-make-link-on-image-in-cakephp/#comments</comments>
		<pubDate>Fri, 25 Jun 2010 11:35:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[make Link on Image in CakePHP]]></category>

		<guid isPermaLink="false">http://php-freelancer.in/?p=116</guid>
		<description><![CDATA[TweetHi Friends, After long time I am writing post. In this article I will tell you how to make link on image via in cakePHP. Making Link in cakePHP is easy but sometime we have to make link on image so it is little bit tricky, I have tried so much and after trying so [...]]]></description>
			<content:encoded><![CDATA[<div class="igit_tsb_button" style="float: left; margin-right: 10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F06%2F25%2Fhow-to-make-link-on-image-in-cakephp%2F&amp;text=How+To+Make+Link+On+Image+In+CakePHP&amp;count=vertical&amp;via=hackingethics" style="" class="twitter-share-button">Tweet</a></div><p>Hi Friends, After long time I am writing post. In this article I will tell you how to make link on image via in cakePHP. Making Link in cakePHP is easy but sometime we have to make link on image so it is little bit tricky, I have tried so much and after trying so many times I found one way to make link on image<span id="more-116"></span>.</p>
<p>Below are the syntax to make link on image.</p>
<p><code>echo $html-&gt;link($html-&gt;image("user_red_delete.png"), 'javascript:;', array('escape' =&gt; false));</code></p>
<p>In above statement you just have to replace your image path with RED words &#8220;user_red_delete.png&#8221;.</p>
<p>After doing this you will see that your image will have link on itself.
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F06%2F25%2Fhow-to-make-link-on-image-in-cakephp%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F06%2F25%2Fhow-to-make-link-on-image-in-cakephp%2F&amp;source=hackingethics&amp;style=compact" height="61" width="50" /><br />
			</a>
		</div>
<img src="http://feeds.feedburner.com/~r/PhpFreelancer/~4/wy_XXjQL3r8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://php-freelancer.in/2010/06/25/how-to-make-link-on-image-in-cakephp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://php-freelancer.in/2010/06/25/how-to-make-link-on-image-in-cakephp/</feedburner:origLink></item>
		<item>
		<title>CakePHP : How To Get Current URL In View In CakePHP</title>
		<link>http://feedproxy.google.com/~r/PhpFreelancer/~3/Kq4bC2lZybY/</link>
		<comments>http://php-freelancer.in/2010/05/08/cakephp-how-to-get-current-url-in-view-in-cakephp/#comments</comments>
		<pubDate>Sat, 08 May 2010 17:42:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[get current url in view in cakePHP]]></category>

		<guid isPermaLink="false">http://php-freelancer.in/?p=109</guid>
		<description><![CDATA[TweetHello Friends, Sometimes we want take current URL in cakePHP in view, Today I got current URL for transferring to that URL after log in. I have tried so many things to work it out and finally I got one working way to get current URL in view. We can use $_SERVER variable to get [...]]]></description>
			<content:encoded><![CDATA[<div class="igit_tsb_button" style="float: left; margin-right: 10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F05%2F08%2Fcakephp-how-to-get-current-url-in-view-in-cakephp%2F&amp;text=CakePHP+%3A+How+To+Get+Current+URL+In+View+In+CakePHP&amp;count=vertical&amp;via=hackingethics" style="" class="twitter-share-button">Tweet</a></div><p><a href="http://php-freelancer.in/wp-content/uploads/2010/04/CakePHP_img.png"><img class="alignright size-full wp-image-73" title="CakePHP_img" src="http://php-freelancer.in/wp-content/uploads/2010/04/CakePHP_img.png" alt="" width="83" height="83" /></a>Hello Friends, Sometimes we want take current URL in cakePHP in view, Today I got current URL for transferring to that URL after log in. I have tried so many things to work it out and finally I got one working way to get current URL in view. We can use $_SERVER variable to get current URL but cakePHP giving its own method to get current URL in view file. It is very easy and it is working perfectly I have used it in my web application and it is working smoothly<span id="more-109"></span>.</p>
<p>So if you want to take current URL in cakePHP view than check out below code :</p>
<p><code>echo Router::url($this-&gt;here, true);</code></p>
<p>This will output current URL. If you want relative path and not full URL than you can do like this :</p>
<p><code>echo $this-&gt;here;</code></p>
<p>By this you can get relative path in the view.
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F05%2F08%2Fcakephp-how-to-get-current-url-in-view-in-cakephp%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F05%2F08%2Fcakephp-how-to-get-current-url-in-view-in-cakephp%2F&amp;source=hackingethics&amp;style=compact" height="61" width="50" /><br />
			</a>
		</div>
<img src="http://feeds.feedburner.com/~r/PhpFreelancer/~4/Kq4bC2lZybY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://php-freelancer.in/2010/05/08/cakephp-how-to-get-current-url-in-view-in-cakephp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://php-freelancer.in/2010/05/08/cakephp-how-to-get-current-url-in-view-in-cakephp/</feedburner:origLink></item>
		<item>
		<title>CakePHP : How To Disable Site Wide Caching In CakePHP</title>
		<link>http://feedproxy.google.com/~r/PhpFreelancer/~3/K2M4KWNc4ao/</link>
		<comments>http://php-freelancer.in/2010/05/08/cakephp-how-to-disable-site-wide-caching-in-cakephp/#comments</comments>
		<pubDate>Sat, 08 May 2010 16:22:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Disable cache in CakePHP]]></category>

		<guid isPermaLink="false">http://php-freelancer.in/?p=106</guid>
		<description><![CDATA[TweetHello Friends, In this article I will share with you that how to disable site wide caching in CakePHP, CakePHP having cache system So many times we have to turn off or turn off cache system, So we can do it cache disable or enable from core.php file which exists in config folder. Open app/config/core.php [...]]]></description>
			<content:encoded><![CDATA[<div class="igit_tsb_button" style="float: left; margin-right: 10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F05%2F08%2Fcakephp-how-to-disable-site-wide-caching-in-cakephp%2F&amp;text=CakePHP+%3A+How+To+Disable+Site+Wide+Caching+In+CakePHP&amp;count=vertical&amp;via=hackingethics" style="" class="twitter-share-button">Tweet</a></div><p>Hello Friends, In this article I will share with you that how to disable site wide caching in CakePHP, CakePHP having cache system So many times we have to turn off or turn off cache system, So we can do it cache disable or enable from core.php file which exists in config folder<span id="more-106"></span>.</p>
<p>Open app/config/core.php file and try to find</p>
<p><code>Configure::write('Cache.disable', true);</code></p>
<p>If this code is commented in core.php file that means your cache system is enabled in your site So if you want to disable just remove comments from this code, It will disable site wide cache.
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F05%2F08%2Fcakephp-how-to-disable-site-wide-caching-in-cakephp%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F05%2F08%2Fcakephp-how-to-disable-site-wide-caching-in-cakephp%2F&amp;source=hackingethics&amp;style=compact" height="61" width="50" /><br />
			</a>
		</div>
<img src="http://feeds.feedburner.com/~r/PhpFreelancer/~4/K2M4KWNc4ao" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://php-freelancer.in/2010/05/08/cakephp-how-to-disable-site-wide-caching-in-cakephp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://php-freelancer.in/2010/05/08/cakephp-how-to-disable-site-wide-caching-in-cakephp/</feedburner:origLink></item>
		<item>
		<title>CakePHP : Set More Than One Variable By One $this-&gt;set Method In Controller</title>
		<link>http://feedproxy.google.com/~r/PhpFreelancer/~3/xEaMHONX2Q0/</link>
		<comments>http://php-freelancer.in/2010/05/08/cakephp-set-more-than-one-variable-by-one-this-set-method-in-controller/#comments</comments>
		<pubDate>Sat, 08 May 2010 15:55:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Set more than one variable by $this->set method]]></category>

		<guid isPermaLink="false">http://php-freelancer.in/?p=103</guid>
		<description><![CDATA[TweetHello Friends, Currently I am working on one CakePHP project and learning so many new things of cakePHP and today while working on one section I learn one new thing in which we can set more than one variable in controller by using only one $this-&#62;set method. I wanted to set so many variables in [...]]]></description>
			<content:encoded><![CDATA[<div class="igit_tsb_button" style="float: left; margin-right: 10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F05%2F08%2Fcakephp-set-more-than-one-variable-by-one-this-set-method-in-controller%2F&amp;text=CakePHP+%3A+Set+More+Than+One+Variable+By+One+%24this-%3Eset+Method+In+Controller&amp;count=vertical&amp;via=hackingethics" style="" class="twitter-share-button">Tweet</a></div><p>Hello Friends, Currently I am working on one CakePHP project and learning so many new things of cakePHP and today while working on one section I learn one new thing in which we can set more than one variable in controller by using only one $this-&gt;set method. I wanted to set so many variables in my controller to use it so I have searched that how we can set more than one variable in controller by $this-&gt;set method and i found that we can do that by using <a href="http://www.php.net/compact" target="_blank">compact()</a> php method. compact() takes the array you pass into it and looks for variables of the same name as the elements in that array. It then spits out an array of key =&gt; value pairs<span id="more-103"></span>.</p>
<p>So generally we use four set method to pass four variables like this<br />
<code><br />
$user = "Ankur";<br />
$foo= "Gandhi";<br />
$temp= "CakePHP";<br />
$test= "Freelancer";<br />
$this-&gt;set('user', $user);<br />
$this-&gt;set('foo', $foo);<br />
$this-&gt;set('temp', $temp);<br />
$this-&gt;set('test', $test);</code></p>
<p>As you see in above code that we are using 4 set method to set variables to use it in view, Now please check below code to see how we can do these all things in a single set method.</p>
<p><code><br />
$user = "Ankur";<br />
$foo= "Gandhi";<br />
$temp= "CakePHP";<br />
$test= "Freelancer";<br />
$this-&gt;set(compact('user', 'foo', 'temp', 'test'));<br />
</code></p>
<p>You can see in above code that we used only one set method and compact method to set variables to use it in view.What compact will do in this? compact() takes the array you pass into it and looks for variables of the same name as the elements in that array.You must have your variables name same as you passed elements in compact. for example If your variable is $user=&#8221;Ankur&#8221;; than you have to pass user in compact to set it for view. If you will use any other variable name in compact than it will not work.
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F05%2F08%2Fcakephp-set-more-than-one-variable-by-one-this-set-method-in-controller%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F05%2F08%2Fcakephp-set-more-than-one-variable-by-one-this-set-method-in-controller%2F&amp;source=hackingethics&amp;style=compact" height="61" width="50" /><br />
			</a>
		</div>
<img src="http://feeds.feedburner.com/~r/PhpFreelancer/~4/xEaMHONX2Q0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://php-freelancer.in/2010/05/08/cakephp-set-more-than-one-variable-by-one-this-set-method-in-controller/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://php-freelancer.in/2010/05/08/cakephp-set-more-than-one-variable-by-one-this-set-method-in-controller/</feedburner:origLink></item>
		<item>
		<title>CakePHP : How To Not Include Layout In A View</title>
		<link>http://feedproxy.google.com/~r/PhpFreelancer/~3/x-UvDFwVZoQ/</link>
		<comments>http://php-freelancer.in/2010/05/08/cakephp-how-to-not-include-layout-in-a-view/#comments</comments>
		<pubDate>Sat, 08 May 2010 14:35:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Not to include any layout cakephp]]></category>

		<guid isPermaLink="false">http://php-freelancer.in/?p=100</guid>
		<description><![CDATA[TweetHello Friends, A layout contains presentation code that wraps around a view. Anything you want to see in all of your views should be placed in a layout.So your every view is wrapped by one layout,If you are not using including layout by $this-&#62;layout = &#8216;layout_name&#8217;; than every time it will use default layout, yesterday [...]]]></description>
			<content:encoded><![CDATA[<div class="igit_tsb_button" style="float: left; margin-right: 10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F05%2F08%2Fcakephp-how-to-not-include-layout-in-a-view%2F&amp;text=CakePHP+%3A+How+To+Not+Include+Layout+In+A+View&amp;count=vertical&amp;via=hackingethics" style="" class="twitter-share-button">Tweet</a></div><p><a href="http://php-freelancer.in/wp-content/uploads/2010/04/CakePHP_img.png"><img class="alignright size-full wp-image-73" title="CakePHP_img" src="http://php-freelancer.in/wp-content/uploads/2010/04/CakePHP_img.png" alt="" width="83" height="83" /></a>Hello Friends, A layout contains presentation code that wraps around a view. Anything you want to see in all of your views should be placed in a layout.So your every view is wrapped by one layout,If you are not using including layout by $this-&gt;layout = &#8216;layout_name&#8217;; than every time it will use default layout, yesterday when I was working on Ajax ,I got one problem in which I don&#8217;t want to use any layout in view but it was including default layout, So I have searched on internet about this and hardly find this solution, So I thought to share it on my site<span id="more-100"></span>.</p>
<p>If you want to use any other layout in view than you have to write in controller like this :</p>
<p><code>$this-&gt;layout = 'layout_name';</code></p>
<p>&#8216;layout_name&#8217; should be your layout name and which exists in &#8216;/app/views/layouts&#8217; directory, Now if you dont want to include any layout in view than you have to make false layout for that controller. Like this.</p>
<p><code>$this-&gt;layout = false;</code>
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F05%2F08%2Fcakephp-how-to-not-include-layout-in-a-view%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fphp-freelancer.in%2F2010%2F05%2F08%2Fcakephp-how-to-not-include-layout-in-a-view%2F&amp;source=hackingethics&amp;style=compact" height="61" width="50" /><br />
			</a>
		</div>
<img src="http://feeds.feedburner.com/~r/PhpFreelancer/~4/x-UvDFwVZoQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://php-freelancer.in/2010/05/08/cakephp-how-to-not-include-layout-in-a-view/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://php-freelancer.in/2010/05/08/cakephp-how-to-not-include-layout-in-a-view/</feedburner:origLink></item>
	</channel>
</rss>
