4. E – Commerce Website Tutorial – PHP MySQL Inventory Management




Series: http://www.developphp.com/video/PHP#eCommerce-Website-Tutorial Source Download: http://www.developphp.com/video/PHP/PayPal-IPN-PHP-Instant-Payment-Notification-Script In this 4th video…

Original source


32 responses to “4. E – Commerce Website Tutorial – PHP MySQL Inventory Management”

  1. Ok I figured the last problem out, but now I am having a problem with the data uploading to the database I think it might be my coedeing though can anyone help, also if anyone gets stuck in the last problem let me know

  2. Hi, First of all, THANK YOU FOR EVERYTHING!!!

    I just hope you are still paying attention to us mortals, I have seen your tutorials again and again while working on a personal project.. and I'm stuck.. I keep getting this mess for some reason:

    "
    Notice: Undefined index: price in …./inventory_list.php on line 56

    Notice: Undefined index: details in …./inventory_list.php on line 59

    Warning: Cannot modify header information – headers already sent by (output started at …./inventory_list.php:56) in …./inventory_list.php on line 74    "

    this shows above the menu on top of my website right after I submit a new item, at one point I tried to put the original code as you left it… still no luck..

  3. Is anyone having or had an issue with the images not uploading to the inventory images folder? It was working for me at first but once I moved all my files to another computer and re created the database and tables. In the the table the id has been assigned but the image does not show on the site. Any help would be greatly appreciated.

  4. THE RIGHT FORM OF THIS :
    $product_list="$date_added – $id – $product_name &nbsp;&nbsp;&nbsp; <a href='#'>edit</a> &bull; <a href='#'>delete</a><br/>";
    IS THIS:
    $product_list="$product_list $date_added – $id – $product_name &nbsp;&nbsp;&nbsp; <a href='#'>edit</a> &bull; <a href='#'>delete</a><br/>";
    IF YOU DON'T DO THAT YOU WOULD HAVE ONLY THE LAST PRODUCT IN THE PRODUCTS LIST.

  5. Hi Adam, A caption says on this video that the image and product details uploaded ok. However I've found that all the details upload ok except for the image. The image does not upload, even on your untouched code. Is there anything I can do to get it working? Thank you

  6. hi, am getting this error while adding a new product, can anyone assist please:
    the error:-Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:xampphtdocsMyOnlineStorestoreadmininventory_list.php on line 62
    Unknown column 'product_name' in 'field list'

  7. hello adam, can you help me? what if iwant to view record from multiple table, i try this but the output repeat itself like this.

    $sql = mysql_query("SELECT * FROM tbl_product, product_category, product_subcategory ORDER BY date_added DESC");
    $productCount = mysql_num_rows($sql); // count the output amount
    if ($productCount > 0) {

        while($row = mysql_fetch_array($sql)){
                 $id = $row["product_id"];
                 $product_name = $row["product_name"];
                 $product_category = $row["product_category"];
                 $unit_price = $row["unit_price"];
                 $quantity = $row["quantity"];
                 $product_subcategory = $row["product_subcategory"];
                 $size = $row["size"];
                 $color = $row["color"];
                 $date_added = strftime("%b %d, %Y", strtotime($row["date_added"]));
    $inventory_list .= "Product ID: $id — product_name: $product_name — product category: $product_category — product subcategory: $product_subcategory — size: $size — color: $color — unit price: $unit_price — quantity: $quantity — <a href='inventory_edit.php?pid=$id'>edit</a> — <a href='inventory_list.php?deleteid=$id'>delete</a><br />";

    when i echo it,the output will bhe like this products record view couple of time, how can i fix this? can you please help me.

    Product ID: 9 — product_name: black shoes — product category: asd — product subcategory: formal shoe — size: 5 — color: red — unit price: 12.00 — quantity: 32 — edit — delete
    Product ID: 9 — product_name: black shoes — product category: asd — product subcategory: asd2 — size: 12332 — color: asdas — unit price: 12.00 — quantity: 32 — edit — delete
    Product ID: 10 — product_name: red shoe — product category: asd — product subcategory: formal shoe — size: 5 — color: red — unit price: 343.00 — quantity: 5345 — edit — delete
    Product ID: 10 — product_name: red shoe — product category: asd — product subcategory: asd2 — size: 12332 — color: asdas — unit price: 343.00 — quantity: 5345 — edit — delete
    Product ID: 9 — product_name: black shoes — product category: men shoe — product subcategory: formal shoe — size: 5 — color: red — unit price: 12.00 — quantity: 32 — edit — delete
    Product ID: 9 — product_name: black shoes — product category: men shoe — product subcategory: asd2 — size: 12332 — color: asdas — unit price: 12.00 — quantity: 32 — edit — delete
    Product ID: 10 — product_name: red shoe — product category: men shoe — product subcategory: formal shoe — size: 5 — color: red — unit price: 343.00 — quantity: 5345 — edit — delete
    Product ID: 10 — product_name: red shoe — product category: men shoe — product subcategory: asd2 — size: 12332 — color: asdas — unit price: 343.00 — quantity: 5345 — edit — delete

  8. Everything is working great for me except from the last part.When i add the following code, the links do not appear next to the product name.

    $product_list = "$id – $productName &nbsp;<a href='#'>edit</a>&nbsp;<a href='#'>delete</a><br/>";
     
    Embedding html within php can be a real pain!! 

Leave a Reply