Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9260151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:49:20+00:00 2026-06-18T12:49:20+00:00

OK so this is what I did: I have made web site, I was

  • 0

OK so this is what I did: I have made web site, I was using xampp sever, I created database in phpMyAdmin, but there was a problem and I had to reinstall xampp, so with that I deleted the database(yes, i didn’t make backup:( ), so I after I install xampp, I created teh same database. But now when I run localhost/website I have a problem with some lines:

Notice: Undefined index: command in C:\xampp\htdocs\BookShop\klasici.php on line 6
and this is on line 6:

if($_REQUEST['command']=='add' && $_REQUEST['productid']>0){

I think the problem is with the session, but I haven’t changes nothing in the scripts. The session starts after the connections with the database. Thank you

But now when I changed the line above with this one:

if(isset($_REQUEST['command']) && $_REQUEST['command']=='add' && $_REQUEST['productid']>0)

{

I have another problem, I can’t not update or delete any itam in the shopping cart, below is a part of the code where I think something is wrong:

if(isset($_REQUEST['command']) && $_REQUEST['command']=='add' &&$_REQUEST['productid']>0)
    {
    remove_product(isset ($_REQUEST['pid']));
}
else if(isset($_REQUEST['command'])=='clear'){
    unset($_SESSION['cart']);
}
else if(isset($_REQUEST['command'])=='update'){
    $max=count($_SESSION['cart']);
    for($i=0;$i<$max;$i++){
        $pid=$_SESSION['cart'][$i]['productid'];
        $q=intval($_REQUEST['product'.$pid]);
        if($q>0 && $q<=999){
            $_SESSION['cart'][$i]['qty']=$q;
        }
        else{
            $msg='Some proudcts not updated!, quantity must be a number   between 1 and 999';
        }
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T12:49:21+00:00Added an answer on June 18, 2026 at 12:49 pm

    try changing it to

    if(isset($_REQUEST[‘command’]) && $_REQUEST[‘command’]==’add’ && $_REQUEST[‘productid’]>0)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have checked this similar question, but the suggestions did not solve my problem:
Does file_get_contents maintain line breaks? I thought it did but I have tried this:
I have asked this question before but did not get the satisfied answer as
I really have no idea what I did to cause this exception, but I
This is the code i have. The NSDictionary did used to be something, but
The problem Initial problem: Hi I have a newly made Yii site where I
I have made a firefox extension which loads a web page using xmlhttprequest .
I have read some threads regarding this and I did already take steps to
I did not find an answer to this question. I have a VOIP application.
I did mockups in balsamiq & they have this nice widget, which Allowed to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.