PHP Professional এবং Zend Certified PHP Engineer (ZCPE ) Course এ সীমিত সংখ্যক আসন বাকি আছে। আগ্রহীদেরকে অতিসত্বর মাসুদ আলম স্যার এর সাথে যোগাযোগ করার জন্য অনুরোধ করা যাচ্ছে। স্যার এর মোবাইল নম্বর : ০১৭২২ ৮১ ৭৫ ৯১
88 comments on “Build a Shopping Cart With PHP Part-1
  1. Parse error: syntax error, unexpected ‘.’ in C:\wamp\www\go4shop\header.php on line 2
    i got error with this.. can you help me?

    • First i wanna thank for the great tutorial Mr Masoud.
      Here is the problem :

      Replace This with the ones in the code =>

      if(isset($_SESSION[‘SESS_LOGGEDIN’]) == TRUE)

      {

      echo ‘Logged in as ‘ . $_SESSION[‘SESS_USERNAME’] . “[logout]”;

      }

      else{

      echo “Login“;

      }

      And this one also : =>

      if(@$_SESSION[‘SESS_ADMINLOGGEDIN’] == 1)

      {

      echo “[admin][admin logout]”;
      }

    • First i wanna thank for the great tutorial Mr Masoud.
      Here is the problem :

      Replace This with the ones in the code =>

      if(isset($_SESSION[‘SESS_LOGGEDIN’]) == TRUE)

      {

      echo ‘Logged in as ‘ . $_SESSION[‘SESS_USERNAME’] . “[logout]“;

      }

      else{

      echo “Login“;

      }

      And this one also : =>

      if(@$_SESSION[‘SESS_ADMINLOGGEDIN’] == 1)

      {

      echo “[admin][admin logout]“;
      }

      • Hi sir after i make the changes in header.php
        as
        if(isset($_SESSION[‘SESS_LOGGEDIN’]) == TRUE)
        {echo “Logged in as”. $_SESSION[‘SESS_USERNAME’]. “[logout]“;
        }
        else
        {
        echo “Login“;
        }

        i m getting this error

        Parse error: parse error, expecting `’,” or `’;” in C:\wamp\www\go4shop\header.php on line 27

        pls help

  2. hi sir,
    i need your help urgently.
    Notice: Undefined index: id in E:\xampp\htdocs\products.php on line 11

    Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in E:\xampp\htdocs\products.php on line 15

    i dont know where is the fault.i hope to hear from you soon.thank you

      • Hi Masud , great gode very helpful. I am new to php and while executing index.php i get the following error

        Parse error: syntax error, unexpected ‘.’ in /home/savsca/public_html/test/D/header.php on line 28

        I would really appreciate if you could get your help on this.

  3. hello sir i just learnd php short cource and i know little bit about it can this pos post is help full for me for making shopping cart? plz tell me

  4. Hello,

    I have studied the above full code & I started working on it,
    When I run the project (localhost/go4shop). It gave me lot of errors. Which I rectified, but I found that some files are missed out in this tutorial like (‘showcart.php’, ‘addtobasket.php’). If you can, please provide me with the files.
    Thanks & regards,
    Srinivasu.M

  5. Sorry i have done some mistake in asking question.
    I am getting some error during data insertion in table customers.
    Please help me.

    Error are here

    #1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘data-cfemail’);if(a){s=”;r=parseInt(a.substr(0,2),16);for(j=2;a.length-j;j+=2){‘ at line 3

  6. Hey frndz ! i need a help. if any one have easy and efficient code of Shoping cart that is proper worked. then please send me at muhammadrabeet@gmail.com
    i need this code for my website. plzz help me !

  7. Fantastic tutorial.. Got a question. is the login system required in it, as in does the user have to login/register to buy things

    Thanks

  8. thanks, I am building this kind of shopping cart too now for my computer course and these are good instructions, I wish I’d be more skilled with SQL though

  9. Hello

    Thank you for making this tutorial available to us. Also we would appreciate if you can make available for download the files used in this tutorial, as when following this tutorial and the next tutorial to complete the project; I am getting a lot of errors and I am unable to correct all of them.
    Thank you

  10. Hi

    Trying to get this cart to work from the instructions and I keep coming across issues with the connections/ showing of the results of tables info due to "

    How do I get around this as I have fixed the header but then I have got the same issue on footer and products

    Thanks in advance

    Martyn

  11. Parse error: syntax error, unexpected ‘” href=”‘ (T_CONSTANT_ENCAPSED_STRING), expecting ‘,’ or ‘;’ in C:\wamp\www\go4shop\bar.php on line 5
    i got error with this.. can you help me?
    this is the code in bar.php:

    echo ““. $catrow[‘name’] . ““;

  12. Some serious issues, but fixed all of them, also noticed some unnescary code, alot of the includes for config.php can be delete, also sessions() aren’t used in PHP 5.4 anymore. But once all of it is working, its a good little system. Im working to expand this and bring it up to date, i got a fully working system now.

    • Can you help me with this problem?

      Parse error: syntax error, unexpected ‘.’ in /Applications/XAMPP/xamppfiles/htdocs/VACO/header.php on line 27

      after i make the changes in header.php

      if(isset($_SESSION[‘SESS_LOGGEDIN’]) == TRUE)
      {echo “Logged in as”. $_SESSION[‘SESS_USERNAME’]. “[logout]“;
      }
      else
      {
      echo “Login“;
      }

      still don’t work

  13. Could you please tell me where to add the admin login link ? footer file will show the admin related links only after admin get logged in. I dont see any link calling the admin login file.

  14. hey thanks for the tutorial but am having an error at this point
    {

    echo “Logged in as ” . $_SESSION[‘SESS_USERNAME’]. “[logout]”;

    }

  15. {

    echo “Logged in as ” . $_SESSION[‘SESS_USERNAME’]. “[logout]”;

    }
    am finding an error at this part

  16. And also i got an error on product.php
    The code is echo”
    … It doesn’t display the product table .. So please help me..

  17. Notice: Undefined index: id in C:\wamp\www\products.php on line 6
    i got this error while running the product.php code
    need some help

  18. Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in C:\wamp\www\products.php on line 8
    got this error again in the same file code “product.php”
    some one make me clear

  19. Hi this is my email:
    albertkwokmk@gmail.com

    can you pls send me the register.php file? because it was missing 🙂 Best regards 🙂

  20. Hi, here is my email:
    albertkwokmk@gmail.com

    can you pls send me the register.php file? because it was missing 🙂 Best regards 🙂

  21. Could you please send file “register.php”? It is missing from the project code.
    Thanks a lot brother.

    Id: mr9876540@gmail.com

  22. Pingback: Php Shopping Cart Paypal | Home

  23. Pingback: Free Php Shopping Cart Script | Home

  24. Pingback: Shopping Cart Php Script |

  25. thanks for this tutorial very good i have also read another tutorial on same topic for creating shopping cart with php and mysql http://talkerscode.com/webtricks/simple-add-to-cart-system-using-jquery-ajax-and-php.php

  26. Pingback: Bootstrap Shopping Cart | emergingloan.com

  27. Hi.
    Thanks for the tutorial. It’s very helpful. but I’m looking for the register.php page code, anyone have it?

  28. Salam, I have a question. I have set up the code and database in my laptop properly.However , I cannot login into the website as admin. Can someone answer me?

  29. Pingback: Paypal Shopping Cart Example |

  30. hi, awesome guide man! very helpful

    can you please send me the register.php file. race512@hotmail.com

    thanks a lot in advance

    Rafael

  31. I don’t even know how I finished up here, but
    I thought this submit was great. I don’t recognize who you’re
    however certainly you’re going to a well-known blogger when you are
    not already. Cheers!

  32. Hi there very nice website!! Man .. Beautiful ..
    Wonderful .. I’ll bookmark your web site and take the feeds also?

    I’m glad to find so many useful information right here within the post, we’d like work out extra techniques on this regard, thank you for sharing.
    . . . . .

  33. I hv a register.php file..
    Anyone know the admin login ID n password?
    Because I try login shishir I’d and password shishir123 it can’t use

  34. Here you go REGISTER.PHP…But is there anybody who fixed errors,there are differences between this online code and download source code

    Registracija korisnika

    Molimo Vas unesite Vaš username i password kako biste se resgistrovali.

    <?php
    if(isset($_GET['submit'])) {
    echo "Y“;
    }
    ?>
    <form action="” method=”POST”>

    Username

    Password

    • Registracija korisnika

      Molimo Vas unesite Vaš username i password kako biste se registrovali.

      <?php
      if(isset($_GET['submit'])) {
      echo "Y“;
      }
      ?>
      <form action="” method=”POST”>

      Username

      Password

  35. Hello, Wish to part of your forum. I also wish to learn more about web applications with PHP. I have a considerable knowledge on PHP and Database, I have done the basis of software engineering specialising in what you are doing here

  36. i got this message..

    Fatal error: Call to undefined function session_register() in C:\xampp\htdocs\trainees\yamini\go4shop\login.php on line 15

  37. The login.php and the adminlogin.php do not work even if you have entered the correct accurate data from the database to login in. i entered the correct details from the database and It still does not work. It keeps saying “Incorrect username/password” even if i entered the exact data from the database. Please help?

Leave a Reply

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