Login   Register  
PHP Classes
elePHPant
Icontem

Site.php file

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      shopcart  >  All threads  >  Site.php file  >  (Un) Subscribe thread alerts  
Subject:Site.php file
Summary:Site.php inclusion
Messages:3
Author:RAZA
Date:2009-08-19 06:20:43
Update:2009-08-22 06:05:33
 

  1. Site.php file   Reply   Report abuse  
Picture of RAZA
RAZA
2009-08-19 06:20:43
Hey guys!

Thanks a lot for your feedback. Unfortunately the file Site.php was not approved. I have uploaded its other copy Site2.php in the includes/classes/ folder. If you still cant find the file, worry not. Here is the code for the file Site.php.


<?php
class Site
{
public function ListProducts()
{
$sql="select productName,productCode,productPrice from products;";
$query=mysql_query($sql);

echo '<table>';
echo '<thead>';
echo '<tr>';
echo '<th>Product Name</th>';
echo '<th>Product Code</th>';
echo '<th>Product Price</th>';
echo '<th>Purchase</th>';
echo '</tr>';
echo '</thead>';
echo '<tbody>';

while($row=mysql_fetch_row($query))
{
echo '<tr>';
echo '<td>'.$row[0].'</td>';
echo '<td>'.$row[1].'</td>';
echo '<td>'.$row[2].'</td>';
echo '<td><a href="Cart.php?add='.$row[1].'">Add to Cart</a></td>';
echo '</tr>';
}

echo '</tbody>';
echo '</table>';
}

}
?>

  2. Re: Site.php file   Reply   Report abuse  
Picture of JALUZO
JALUZO
2009-08-20 07:18:33 - In reply to message 1 from RAZA
THANK YOU for the file Site.php

Please HELP installation repertoire !!!!!

Fatal error: Call to undefined method Site::GetProductInfo()

?????



  3. Re: Site.php file   Reply   Report abuse  
Picture of RAZA
RAZA
2009-08-22 06:05:33 - In reply to message 2 from JALUZO
Hey Jaluzo!

Just use the this line of code:

$site->ListProducts();