<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments for Webmaster Video School</title>
	<atom:link href="http://www.webmastervideoschool.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webmastervideoschool.com</link>
	<description>Web design video blog for webmasters</description>
	<lastBuildDate>Sun, 27 Feb 2011 07:30:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Video tutorial: How to create PHP Shopping cart using SESSION object variables by Alex Flom</title>
		<link>http://www.webmastervideoschool.com/php_my_sql/video-tutorial-how-to-create-php-shopping-cart-using-session-object-variables/comment-page-1/#comment-79</link>
		<dc:creator>Alex Flom</dc:creator>
		<pubDate>Sun, 27 Feb 2011 07:30:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.webmastervideoschool.com/?p=16#comment-79</guid>
		<description>Hi,

This is not the code I used.
Where is session_start(); ?

Alex</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>This is not the code I used.<br />
Where is session_start(); ?</p>
<p>Alex</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Video tutorial: How to create PHP Shopping cart using SESSION object variables by Harris Tanveer</title>
		<link>http://www.webmastervideoschool.com/php_my_sql/video-tutorial-how-to-create-php-shopping-cart-using-session-object-variables/comment-page-1/#comment-78</link>
		<dc:creator>Harris Tanveer</dc:creator>
		<pubDate>Sat, 26 Feb 2011 23:27:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.webmastervideoschool.com/?p=16#comment-78</guid>
		<description>Hi Sir
First of all thanks for the nice tutorial. I am trying to make cart.php to work with my product display page and its keep giving me an empty cart. if you kindly take a look at my code. Thanks
---------------------------------
edit.php



Employees Database




      

  &lt;?php
     
  $db = mysqli_connect(&quot;localhost&quot;,&quot;root&quot;,&quot;&quot;,&quot;sakila&quot;);

    if (!$db)
    { die(&#039;Could not connect to the sakila Database: &#039; .mysqli_connect_error($db));}

    $result = mysqli_query($db, &quot;SELECT * FROM film limit 0,10&quot;);

         if(!$result){
            die(&#039;Could not select record from the  Database: &#039; . mysqli_error($db));}
                       
        while ($row=mysqli_fetch_array($result)){
            echo&quot;&quot;;
        
        echo (&quot;$row[title]&quot;);
        echo (&quot;$row[description]&quot;);
        
       // echo (&quot;&lt;a href=&quot;cart.php?id=$row[film_id]&quot; rel=&quot;nofollow&quot;&gt;ADD&lt;/a&gt;&quot;);
        //echo (&quot;&lt;a href=&quot;delete.php?id=$row[emp_no]&quot; rel=&quot;nofollow&quot;&gt;Delete&lt;/a&gt;&quot;);
      
      ?&gt;

     
    
        
            &lt;input type=&quot;text&quot; name=&quot;filmID&quot;  value=&quot;&quot;/&gt;
            
        
    
        &lt;?php
     echo &quot;&quot;;
     }
     ?&gt;
     


   
----------------------------------------------------------------------------------------------
cart.php
-----------------------------------------------------------------------------------------------


 


    
        
        
    
    
&lt;?php
if (isset($_GET[&#039;id&#039;]))
 $id=$_GET[&#039;id&#039;];
 else
 $id=1;
 
      $db = mysqli_connect(&quot;localhost&quot;,&quot;root&quot;, &quot;&quot;,&quot;sakila&quot;);
      if (!$db)
      {
            die(&#039;Could not connect to the Sakila Database: &#039; .
                    mysqli_error($db));
      }
echo &quot; Shopping Cart &quot;;



if (isset($_GET[&#039;action&#039;]))
 $action=$_GET[&#039;action&#039;];
 else
 $action=&quot;empty&quot;;

switch($action)
 {
 case &quot;add&quot;:
 if (isset($_SESSION[&#039;cart&#039;][$id]))
 $_SESSION[&#039;cart&#039;][$id]++;
 else
 $_SESSION[&#039;cart&#039;][$id]=1;
 break;
 case &quot;remove&quot;:
 if (isset($_SESSION[&#039;cart&#039;][$id]))
 {
  $_SESSION[&#039;cart&#039;][$id];
 if ($_SESSION[&#039;cart&#039;][$id]==0)
 unset($_SESSION[&#039;cart&#039;][$id]);
 }
 break;
 case &quot;empty&quot;:
 unset($_SESSION[&#039;cart&#039;]);
 break;
 }
 /*Display cart*/
 if (isset($_SESSION[&#039;cart&#039;]))
 {

echo &quot;&quot;;
 $total=0;
 foreach($_SESSION[&#039;cart&#039;] as $id =&gt; $x)
 {
 $result = mysql_query(&quot;SELECT title, rental_rate from film WHERE film_id=$id&quot;,$db);
 $myrow = mysql_fetch_array($result);
 $name=$myrow[&#039;title&#039;];
 $name=substr($name,0,40);
 $price=$myrow[&#039;rental_rate&#039;];
 $line_cost=$price * $x;
 $total=$total+$line_cost;
 echo &quot;&quot;;
 echo &quot; $name &quot;;
 echo &quot;X $x &quot;;
 echo &quot;= $line_cost $&quot;;
 echo &quot;&quot;;
 }
 echo &quot;&quot;;
 echo&quot;Total=&quot;;
 echo &quot;&lt;b&gt; $total $&lt;/b&gt;&quot;;
 echo&quot;&quot;;
 echo &quot;&quot;;
 }
 else
 echo &quot;Cart is empty&quot;;
 ?&gt;
 
</description>
		<content:encoded><![CDATA[<p>Hi Sir<br />
First of all thanks for the nice tutorial. I am trying to make cart.php to work with my product display page and its keep giving me an empty cart. if you kindly take a look at my code. Thanks<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
edit.php</p>
<p>Employees Database</p>
<p>  &lt;?php</p>
<p>  $db = mysqli_connect(&quot;localhost&quot;,&quot;root&quot;,&quot;&quot;,&quot;sakila&quot;);</p>
<p>    if (!$db)<br />
    { die(&#039;Could not connect to the sakila Database: &#039; .mysqli_connect_error($db));}</p>
<p>    $result = mysqli_query($db, &quot;SELECT * FROM film limit 0,10&quot;);</p>
<p>         if(!$result){<br />
            die(&#039;Could not select record from the  Database: &#039; . mysqli_error($db));}</p>
<p>        while ($row=mysqli_fetch_array($result)){<br />
            echo&quot;&#8221;;</p>
<p>        echo (&#8220;$row[title]&#8220;);<br />
        echo (&#8220;$row[description]&#8220;);</p>
<p>       // echo (&#8220;<a href="cart.php?id=$row[film_id]" rel="nofollow">ADD</a>&#8220;);<br />
        //echo (&#8220;<a href="delete.php?id=$row[emp_no]" rel="nofollow">Delete</a>&#8220;);</p>
<p>      ?&gt;</p>
<p>            &lt;input type=&quot;text&quot; name=&quot;filmID&quot;  value=&quot;&#8221;/&gt;</p>
<p>        &lt;?php<br />
     echo &quot;&#8221;;<br />
     }<br />
     ?&gt;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
cart.php<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>&lt;?php<br />
if (isset($_GET[&#039;id&#039;]))<br />
 $id=$_GET[&#039;id&#039;];<br />
 else<br />
 $id=1;</p>
<p>      $db = mysqli_connect(&quot;localhost&quot;,&quot;root&quot;, &quot;&quot;,&quot;sakila&quot;);<br />
      if (!$db)<br />
      {<br />
            die(&#039;Could not connect to the Sakila Database: &#039; .<br />
                    mysqli_error($db));<br />
      }<br />
echo &quot; Shopping Cart &#8220;;</p>
<p>if (isset($_GET['action']))<br />
 $action=$_GET['action'];<br />
 else<br />
 $action=&#8221;empty&#8221;;</p>
<p>switch($action)<br />
 {<br />
 case &#8220;add&#8221;:<br />
 if (isset($_SESSION['cart'][$id]))<br />
 $_SESSION['cart'][$id]++;<br />
 else<br />
 $_SESSION['cart'][$id]=1;<br />
 break;<br />
 case &#8220;remove&#8221;:<br />
 if (isset($_SESSION['cart'][$id]))<br />
 {<br />
  $_SESSION['cart'][$id];<br />
 if ($_SESSION['cart'][$id]==0)<br />
 unset($_SESSION['cart'][$id]);<br />
 }<br />
 break;<br />
 case &#8220;empty&#8221;:<br />
 unset($_SESSION['cart']);<br />
 break;<br />
 }<br />
 /*Display cart*/<br />
 if (isset($_SESSION['cart']))<br />
 {</p>
<p>echo &#8220;&#8221;;<br />
 $total=0;<br />
 foreach($_SESSION['cart'] as $id =&gt; $x)<br />
 {<br />
 $result = mysql_query(&#8220;SELECT title, rental_rate from film WHERE film_id=$id&#8221;,$db);<br />
 $myrow = mysql_fetch_array($result);<br />
 $name=$myrow['title'];<br />
 $name=substr($name,0,40);<br />
 $price=$myrow['rental_rate'];<br />
 $line_cost=$price * $x;<br />
 $total=$total+$line_cost;<br />
 echo &#8220;&#8221;;<br />
 echo &#8221; $name &#8220;;<br />
 echo &#8220;X $x &#8220;;<br />
 echo &#8220;= $line_cost $&#8221;;<br />
 echo &#8220;&#8221;;<br />
 }<br />
 echo &#8220;&#8221;;<br />
 echo&#8221;Total=&#8221;;<br />
 echo &#8220;<b> $total $</b>&#8220;;<br />
 echo&#8221;";<br />
 echo &#8220;&#8221;;<br />
 }<br />
 else<br />
 echo &#8220;Cart is empty&#8221;;<br />
 ?&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Planning the &#8220;Advanced Webmaster Course&#8221; any suggestions? by Alex Flom</title>
		<link>http://www.webmastervideoschool.com/misc/planning-the-advanced-webmaster-course-any-suggestions/comment-page-1/#comment-76</link>
		<dc:creator>Alex Flom</dc:creator>
		<pubDate>Thu, 24 Feb 2011 18:16:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.webmastervideoschool.com/?p=551#comment-76</guid>
		<description>Hi David!

Thank you, will add this for sure!</description>
		<content:encoded><![CDATA[<p>Hi David!</p>
<p>Thank you, will add this for sure!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Planning the &#8220;Advanced Webmaster Course&#8221; any suggestions? by David</title>
		<link>http://www.webmastervideoschool.com/misc/planning-the-advanced-webmaster-course-any-suggestions/comment-page-1/#comment-75</link>
		<dc:creator>David</dc:creator>
		<pubDate>Thu, 24 Feb 2011 18:14:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.webmastervideoschool.com/?p=551#comment-75</guid>
		<description>hi ales

i suggest adding  to the course  videos about secure website and ssl cartificate</description>
		<content:encoded><![CDATA[<p>hi ales</p>
<p>i suggest adding  to the course  videos about secure website and ssl cartificate</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Planning the &#8220;Advanced Webmaster Course&#8221; any suggestions? by Pat</title>
		<link>http://www.webmastervideoschool.com/misc/planning-the-advanced-webmaster-course-any-suggestions/comment-page-1/#comment-74</link>
		<dc:creator>Pat</dc:creator>
		<pubDate>Mon, 21 Feb 2011 16:24:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.webmastervideoschool.com/?p=551#comment-74</guid>
		<description>Getting deeper with php and elgg would be cool.</description>
		<content:encoded><![CDATA[<p>Getting deeper with php and elgg would be cool.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

