Robie zgodnie w poradnikiem. Czy ktos widzi blad? Proszę mnie poprawic bo utknąłem ; )
Nie mogę doszukac sie błedu a sprawdzam literka po literce i mam tak samo.
index.php
<?php require 'cart.php'; ?> <html> <head> </head> <body> <?php products(); ?> </body> <html>
cart.php
$page = 'index.php'; $quantity = mysql_query('SELECT id, quantity FROM products WHERE id='.mysql_real_escape_string((int)$_GET['add'])); if ($quantity_row['quantity']!=$_SESSION['cart_'.$_GET['add']]) { $_SESSION['cart_'.$_GET['add']]+='1'; } } } function products() { $get = mysql_query('SELECT id, name, description, price FROM products WHERE quantity > 0 ORDER BY id DESC'); } else { echo '<p>'.$get_row['name'].'<br />'.$get_row['description'].'<br />'.number_format($get_row['price'], 2).' <a href="cart.php?add='.$get_row['id'].'">Add</a></p>'; } } } ?>
http://postimage.org/image/onepccixz/
http://postimage.org/image/vf54f77xj/ - podgląd na baze