<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>p2p.wrox.com Forums - BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8</title>
		<link>http://p2p.wrox.com</link>
		<description>This is the forum to discuss the Wrox book Professional CodeIgniter by Thomas Myer; ISBN: 9780470282458 Read more about Professional CodeIgniter  or buy the book from your favorite retailerDownload the code for Professional CodeIgniter Buy chapters from this book in PDF</description>
		<language>en</language>
		<lastBuildDate>Sat, 21 Nov 2009 23:23:11 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://p2p.wrox.com/images/misc/rss.jpg</url>
			<title>p2p.wrox.com Forums - BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8</title>
			<link>http://p2p.wrox.com</link>
		</image>
		<item>
			<title>Session timeout</title>
			<link>http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8/77082-session-timeout.html</link>
			<pubDate>Thu, 19 Nov 2009 09:53:06 GMT</pubDate>
			<description>Hi all,does anyone ever use session timeout with codeigniter?Suppose if there are no activity for 5 minutes,then it will go to login page..How to do...</description>
			<content:encoded><![CDATA[<div>Hi all,does anyone ever use session timeout with codeigniter?Suppose if there are no activity for 5 minutes,then it will go to login page..How to do it?Thanks...</div>

]]></content:encoded>
			<category domain="http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8-414/">BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8</category>
			<dc:creator>handoyo</dc:creator>
			<guid isPermaLink="true">http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8/77082-session-timeout.html</guid>
		</item>
		<item>
			<title>i have 2 error, help me please</title>
			<link>http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8/77051-i-have-2-error-help-me-please.html</link>
			<pubDate>Mon, 16 Nov 2009 17:06:39 GMT</pubDate>
			<description>hi i new on this codeigniter so i still dont know what the problem of this error
so help me to resolve it please, thank

A PHP Error was...</description>
			<content:encoded><![CDATA[<div>hi i new on this codeigniter so i still dont know what the problem of this error<br />
so help me to resolve it please, thank<br />
<br />
A PHP Error was encountered<br />
<br />
Severity: Notice<br />
<br />
Message: Undefined index: id<br />
<br />
Filename: controllers/welcome.php<br />
<br />
Line Number: 15<br />
<br />
for the database<br />
<br />
<br />
A Database Error Occurred<br />
<br />
Error Number: 1064<br />
<br />
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND `status` = 'active' ORDER BY `category_id` asc LIMIT 100' at line 4<br />
<br />
SELECT `id`, `name`, `thumbnail`, `category_id` FROM (`products`) WHERE `id` != AND `status` = 'active' ORDER BY `category_id` asc LIMIT 100</div>

]]></content:encoded>
			<category domain="http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8-414/">BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8</category>
			<dc:creator>peter_kung</dc:creator>
			<guid isPermaLink="true">http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8/77051-i-have-2-error-help-me-please.html</guid>
		</item>
		<item>
			<title>search results show inactive status</title>
			<link>http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8/76949-search-results-show-inactive-status.html</link>
			<pubDate>Sun, 08 Nov 2009 13:02:00 GMT</pubDate>
			<description>When I search a product, it shows inactive status product as well.

Even though mproducts/search has where status =...</description>
			<content:encoded><![CDATA[<div>When I search a product, it shows inactive status product as well.<br />
<br />
Even though mproducts/search has where status = active,<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">$this-&gt;db-&gt;where('status','active');</code><hr />
</div>Why does it show inactive product here?[:0]</div>

]]></content:encoded>
			<category domain="http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8-414/">BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8</category>
			<dc:creator>phpcoder101</dc:creator>
			<guid isPermaLink="true">http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8/76949-search-results-show-inactive-status.html</guid>
		</item>
		<item>
			<title>Error message when I click go back one page after log out</title>
			<link>http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8/76922-error-message-when-i-click-go-back-one-page-after-log-out.html</link>
			<pubDate>Thu, 05 Nov 2009 21:41:35 GMT</pubDate>
			<description>First I log in and log out from admin.

Then when I click go back button of a browser, I get the following error messages.

Also when I visit...</description>
			<content:encoded><![CDATA[<div>First I log in and log out from admin.<br />
<br />
Then when I click go back button of a browser, I get the following error messages.<br />
<br />
Also when I visit /index.php/admin/dashboard directly without logging-in I get the same error messages.<br />
<br />
Could anyone tell me how to fix the problem please?[:confused:]<br />
<br />
<br />
Thanks in advance.<br />
<br />
<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				A PHP Error was encountered<br />
<br />
Severity: Notice<br />
<br />
Message: Undefined index: userid<br />
<br />
Filename: admin/dashboard.php<br />
<br />
Line Number: 8<br />
<br />
A PHP Error was encountered<br />
<br />
Severity: Warning<br />
<br />
Message: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\codeigniter_shopping\system\librar  ies\Exceptions.php:166)<br />
<br />
Filename: helpers/url_helper.php<br />
<br />
Line Number: 539
			
			<hr />
		</td>
	</tr>
	</table>
</div></div>

]]></content:encoded>
			<category domain="http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8-414/">BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8</category>
			<dc:creator>phpcoder101</dc:creator>
			<guid isPermaLink="true">http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8/76922-error-message-when-i-click-go-back-one-page-after-log-out.html</guid>
		</item>
		<item>
			<title><![CDATA[Shouldn't they be in a controller?]]></title>
			<link>http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8/76921-shouldnt-they-controller.html</link>
			<pubDate>Thu, 05 Nov 2009 17:07:54 GMT</pubDate>
			<description><![CDATA[models/morders have the following codes.

And I am wondering, since there are nothing to do with a database, they can be in a controller.

Shouldn't...]]></description>
			<content:encoded><![CDATA[<div>models/morders have the following codes.<br />
<br />
And I am wondering, since there are nothing to do with a database, they can be in a controller.<br />
<br />
Shouldn't they?<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">class MOrders extends Model{<br />
&nbsp;function&nbsp; __construct(){<br />
&nbsp; &nbsp; parent::Model();<br />
&nbsp;}<br />
<br />
function updateCart($productid,$fullproduct){<br />
&nbsp; &nbsp; &nbsp; &nbsp; //pull in existing cart first!<br />
&nbsp; &nbsp; &nbsp; &nbsp; $cart = isset($_SESSION['cart']) ? $_SESSION['cart'] : array();<br />
&nbsp; &nbsp; &nbsp; &nbsp; // $cart = $_SESSION['cart'];//$this-&gt;session-&gt;userdata('cart');<br />
&nbsp; &nbsp; &nbsp; &nbsp; $productid = id_clean($productid);<br />
&nbsp; &nbsp; &nbsp; &nbsp; $totalprice = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (count($fullproduct)){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (isset($cart[$productid])){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $prevct = $cart[$productid]['count'];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $prevname = $cart[$productid]['name'];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $prevprice = $cart[$productid]['price'];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $cart[$productid] = array(<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'name' =&gt; $prevname,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'price' =&gt; $prevprice,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'count' =&gt; $prevct + 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; );<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }else{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $cart[$productid] = array(<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'name' =&gt; $fullproduct['name'],<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'price' =&gt; $this-&gt;format_currency($fullproduct['price']),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'count' =&gt; 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; );&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; foreach ($cart as $id =&gt; $product){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $totalprice += $product['price'] * $product['count'];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $_SESSION['totalprice'] = $this-&gt;format_currency($totalprice);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //$this-&gt;session-&gt;set_userdata('totalprice', $totalprice);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $_SESSION['cart'] = $cart;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //$this-&gt;session-&gt;set_userdata('cart',true);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;session-&gt;set_flashdata('conf_msg', &quot;We've added this product to your cart.&quot;); <br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
}<br />
<br />
function removeLineItem($id){<br />
&nbsp; &nbsp; &nbsp; &nbsp; $id = id_clean($id);<br />
&nbsp; &nbsp; &nbsp; &nbsp; $totalprice = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; $cart = $_SESSION['cart'];//$this-&gt;session-&gt;userdata('cart');<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (isset($cart[$id])){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; unset($cart[$id]);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; foreach ($cart as $id =&gt; $product){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $totalprice += $product['price'] * $product['count'];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $_SESSION['totalprice'] = $this-&gt;format_currency($totalprice);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $_SESSION['cart'] = $cart;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //$this-&gt;session-&gt;set_userdata('totalprice', $totalprice);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //$this-&gt;session-&gt;set_userdata('cart',true);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo &quot;Product removed.&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }else{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo &quot;Product not in cart!&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
}<br />
<br />
function updateCartAjax($idlist){<br />
&nbsp; &nbsp; &nbsp; &nbsp; $cart = $_SESSION['cart'];//$this-&gt;session-&gt;userdata('cart');<br />
&nbsp; &nbsp; &nbsp; &nbsp; //split idlist on comma first<br />
&nbsp; &nbsp; &nbsp; &nbsp; $records = explode(',',$idlist);<br />
&nbsp; &nbsp; &nbsp; &nbsp; $updated = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; $totalprice = $_SESSION['totalprice'];<br />
&nbsp; &nbsp; &nbsp; &nbsp; //$this-&gt;session-&gt;userdata('totalprice');<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (count($records)){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; foreach ($records as $record){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (strlen($record)){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //split each record on colon<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $fields = explode(&quot;:&quot;,$record);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $id = id_clean($fields[0]);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $ct = $fields[1];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($ct &gt; 0 &amp;&amp; $ct != $cart[$id]['count']){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $cart[$id]['count'] = $ct;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $updated++;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }elseif ($ct == 0){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; unset($cart[$id]);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $updated++;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($updated){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $totalprice=0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; foreach ($cart as $id =&gt; $product){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $totalprice += $product['price'] * $product['count'];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $_SESSION['totalprice'] = $this-&gt;format_currency($totalprice);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $_SESSION['cart'] = $cart;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //$this-&gt;session-&gt;set_userdata('totalprice', $totalprice);&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //$this-&gt;session-&gt;set_userdata('cart',true);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; switch ($updated){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case 0:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $string = &quot;No records&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case 1:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $string = &quot;$updated record&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; default:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $string = &quot;$updated records&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo &quot;$string updated&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //$this-&gt;session-&gt;set_flashdata('update_count', $string .&quot; updated&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }else{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo &quot;No changes detected&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //$this-&gt;session-&gt;set_flashdata('update_count', &quot;No changes detected&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; }else{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo &quot;Nothing to update&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //$this-&gt;session-&gt;set_flashdata('update_count', &quot;Nothing to update&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
}</code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8-414/">BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8</category>
			<dc:creator>phpcoder101</dc:creator>
			<guid isPermaLink="true">http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8/76921-shouldnt-they-controller.html</guid>
		</item>
		<item>
			<title>Add to cart problem</title>
			<link>http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8/76906-add-cart-problem.html</link>
			<pubDate>Wed, 04 Nov 2009 20:58:46 GMT</pubDate>
			<description><![CDATA[I freshly installed Claudia's Kids in my localhost.

I deleted my cookies in FF. 

Then when I click Add to cart button, I get the following...]]></description>
			<content:encoded><![CDATA[<div>I freshly installed Claudia's Kids in my localhost.<br />
<br />
I deleted my cookies in FF. <br />
<br />
Then when I click Add to cart button, I get the following errors.<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">A PHP Error was encountered<br />
<br />
Severity: Notice<br />
<br />
Message: Undefined index: cart<br />
<br />
Filename: models/morders.php<br />
<br />
Line Number: 10<br />
A PHP Error was encountered<br />
<br />
Severity: Warning<br />
<br />
Message: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\codeigniter_shopping_original\system\libraries\Exceptions.php:164)<br />
<br />
Filename: libraries/Session.php<br />
<br />
Line Number: 295<br />
A PHP Error was encountered<br />
<br />
Severity: Warning<br />
<br />
Message: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\codeigniter_shopping_original\system\libraries\Exceptions.php:164)<br />
<br />
Filename: helpers/url_helper.php<br />
<br />
Line Number: 485</code><hr />
</div>The line 10 in morders.php is the following.<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">function updateCart($productid,$fullproduct){<br />
&nbsp; &nbsp; &nbsp; &nbsp; //pull in existing cart first!<br />
&nbsp; &nbsp; &nbsp; &nbsp; $cart = $_SESSION['cart'];//$this-&gt;session-&gt;userdata('cart');<br />
&nbsp; &nbsp; &nbsp; &nbsp; $productid = id_clean($productid);<br />
&nbsp; &nbsp; &nbsp; &nbsp; $totalprice = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (count($fullproduct)){<br />
..<br />
...</code><hr />
</div><br />
I go back or refresh it then it shows no error messages.<br />
<br />
I repeated again. Deleted cookies, then visit the home page then click &quot;Add to cart button&quot;, then again the same error message.<br />
<br />
Could anyone tell me how to fix this problem?<br />
<br />
Regards.[:o]</div>

]]></content:encoded>
			<category domain="http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8-414/">BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8</category>
			<dc:creator>phpcoder101</dc:creator>
			<guid isPermaLink="true">http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8/76906-add-cart-problem.html</guid>
		</item>
		<item>
			<title>Not able to delete flashdata</title>
			<link>http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8/76846-not-able-delete-flashdata.html</link>
			<pubDate>Sun, 01 Nov 2009 14:52:39 GMT</pubDate>
			<description><![CDATA[When I visit codeigniter_shopping/welcome/index, there is always flashdata message telling "You did not fill out the form!".

When I visit...]]></description>
			<content:encoded><![CDATA[<div>When I visit codeigniter_shopping/welcome/index, there is always flashdata message telling &quot;You did not fill out the form!&quot;.<br />
<br />
When I visit codeigniter_shopping, there is no flashdata.<br />
<br />
Or vise versa.<br />
<br />
Could anyone tell me how to display this warning only when it should.<br />
<br />
At the moment there is always this flashdata in the index.<br />
<br />
Is there time limit for CI session?<br />
<br />
It also does not show flashdata when I succeed the registration. It should show &quot;Thanks for subscribing&quot;<br />
<br />
Nor Invalid email. Please try again! for email validation.<br />
<br />
Is it wise to use flashdata for validation, if flashdata comes up like this?<br />
<br />
Thanks in advance.[:o]</div>

]]></content:encoded>
			<category domain="http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8-414/">BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8</category>
			<dc:creator>phpcoder101</dc:creator>
			<guid isPermaLink="true">http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8/76846-not-able-delete-flashdata.html</guid>
		</item>
		<item>
			<title>CSV export problem</title>
			<link>http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8/76844-csv-export-problem.html</link>
			<pubDate>Sun, 01 Nov 2009 11:07:36 GMT</pubDate>
			<description>When I export csv file for products and categories, a row of each data in csv is in one cell.

e.g....</description>
			<content:encoded><![CDATA[<div>When I export csv file for products and categories, a row of each data in csv is in one cell.<br />
<br />
e.g. <br />
id,&quot;name&quot;,&quot;shortdesc&quot;,&quot;longdesc&quot;,&quot;thumbnail&quot;,&quot;imag  e&quot;,&quot;grouping&quot;,&quot;status&quot;,&quot;category_id&quot;,&quot;featured&quot;  , <br />
<br />
is in one cell.<br />
<br />
Could anyone tell me how to fix this problem?<br />
<br />
I open csv with MS Exel.<br />
<br />
Regards.</div>

]]></content:encoded>
			<category domain="http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8-414/">BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8</category>
			<dc:creator>phpcoder101</dc:creator>
			<guid isPermaLink="true">http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8/76844-csv-export-problem.html</guid>
		</item>
		<item>
			<title>I wish I could see order details in the back-end</title>
			<link>http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8/76843-i-wish-i-could-see-order-details-back-end.html</link>
			<pubDate>Sun, 01 Nov 2009 10:32:14 GMT</pubDate>
			<description>I wish two things if there is the second edition of this book.

1. I want to see the order details in the back end. Currently there is none.
I want...</description>
			<content:encoded><![CDATA[<div>I wish two things if there is the second edition of this book.<br />
<br />
1. I want to see the order details in the back end. Currently there is none.<br />
I want to see the name, id, address, details of orders etc.<br />
<br />
2. I want to see another gateway solutions, not only google account.<br />
Google account is available only for US and UK, so outside these two countries, there is no way we can use them.<br />
<br />
I hope there will be the second edition.</div>

]]></content:encoded>
			<category domain="http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8-414/">BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8</category>
			<dc:creator>phpcoder101</dc:creator>
			<guid isPermaLink="true">http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8/76843-i-wish-i-could-see-order-details-back-end.html</guid>
		</item>
		<item>
			<title>How to display error of flashdata</title>
			<link>http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8/76842-how-display-error-flashdata.html</link>
			<pubDate>Sun, 01 Nov 2009 09:43:43 GMT</pubDate>
			<description><![CDATA[When I click "updata" in welcome/cart, it shows fatal error... in flashdata.
but it is so short and I am not able to read it.

How can I make it to...]]></description>
			<content:encoded><![CDATA[<div>When I click &quot;updata&quot; in welcome/cart, it shows fatal error... in flashdata.<br />
but it is so short and I am not able to read it.<br />
<br />
How can I make it to show the error so that I can read it?<br />
<br />
Thanks in advance.[:D]</div>

]]></content:encoded>
			<category domain="http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8-414/">BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8</category>
			<dc:creator>phpcoder101</dc:creator>
			<guid isPermaLink="true">http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8/76842-how-display-error-flashdata.html</guid>
		</item>
	</channel>
</rss>
