7. E – Commerce Website Tutorial – PHP MySQL Dynamic Home Page

www.developphp.com In this 7th video we will dynamically render an always up-to-date “newest items” listing for the online store’s home page. The E – Commerce Web Site we will be assembling is one in which all of the inventory is in a MySQL database and we offer a custom PHP cart for a unique shopping experience.


  • Adam,

    Thank you so much for your time and efforts in continuing this series, I really appreciate your efforts. I hope you have a great holiday and well deserved time off. I am trying to learn everything you are teaching and look forward to your continued tutorials.



  • I am a CSS DIV zen masta.
    I practice DIV fu all day longs.
    sometimes I even
    put a div inside a div, when I div,
    so i can div when i div, inside my div. [thumbs up if you get it]

  • Hi Adam,

    Is there a way for me to stop the “Latest Designer Fashions” from displaying more than two products? I’d like to limit it, on this page and then list them all on the Products Page. Thanks.

  • @TechyVidz
    Upon about a half our of investigation I realized that I am an idiot and just needed to change it in the SQL query instead of the PHP code. If anyone needs to know, I just changed LIMIT 6 to LIMIT 2.

  • hey i love these toutorials. its better than i have ever seen.
    still im kinda new to this but i have 1 hookup.
    i am using Globat and looks like the site works fine but the store admin wil not work. any of those pages i go it kiks me right to the login page.
    can anyone help?

  • hello adam, thanks for the tutorial but i am wondering how can i make tables , show side by side? ps sorry about my english..
    exmaple i made mine like this

    //connect to database
    include ('../../../../includes/conn/conn_to_mysql.php');

    // this block grabs the whole list of veiewing

  • $dynamiclist =””;
    $sql = mysql_query(“SELECT * FROM dougandpete_products_plants_annual ORDER BY date_added DESC LIMIT 6”);
    $productCount = mysql_num_rows($sql); // count output amount
    if ($productCount > 0){
    while($row = mysql_fetch_array($sql)){
    $id = $row[“id”];
    $product_name = $row[“product_name”];
    $price = $row[“price”];
    $date_added = strftime (“%b %d, %Y”, strtotime($row[“date_added”]));

  • hi adam,
    hopfuly thanks to you for providing us this great tutorial………..in the hole world some people are greatly differant from all of others…you are one of the differant guys..so great you are…………..thaks to you again…

  • @@

    In the dynamic page,suppose i have 20 item for selling..using LIMIT i can show up product,how much i like.that okkk…….but if i like to show 10 product in home page ,then how can i show next 10 product is home page using a “NEXT ” button..

    i mean i would like to use a “NEXT” button in dynamic home page,to disply more product ,with LIMIT…..

    adam please help us…..

    or any one of you can define the “NEXT” button with code,,,please upload the code .here.

    thank you all.

  • Thank you for such a nice video! Set up your ecommerce business for free with our Easy Help Zen Cart Tutorials and our Free Zen Cart Templates.

  • your the man dude these tutorials are epic. i have one little problem with this and my products page though when i try to create a dynamic table with 2 columns so i can display more products it just duplicates the products so ile have two black tops next to each other and 2 black hats next to each other etc etc etc i have tryed editing the php code to like ID++ or +1 to no prevail and also as “tanib10” said how can i implement a next button?? please help or anyone who has got this working

  • I’ve got my index page just like you have it, except my footer is above the content section, and ideas?

    Thanks guys,

    Nice tutorial-

Leave a Reply

Your email address will not be published. Required fields are marked *