Question: This is my Python code:

```
choice = (input("Are you signed up? (y/n) "))

print(choice)

while True:
    if choice != "y" or choice != "n":
        choice = (input("Are you signed up? (y/n) "))
        print(choice)
    else:
        break

```

I want the program to keep asking the user for input until they input "y" or "n". The problem is it never accepts the input, even if they do input "y" or "n".

When I print what they inputted (that's a real word) it says that it's "y" or "n" but it still won't accept it.

I've been using Python for some time now and I'm just trying something out today but I can't figure this out for some reason, I feel like it's something simple and obvious but I'm stupid to notice it.

Can someone explain this to me, please? Thank you.

Answer: 
Looping through `$entries = array( $item_code, $item_name, $qty, $cost);` is not correct. You will have to loop through post data array of each item in invoice.

```
$query = "INSERT INTO `invoiceitems` (`client_id`, `item_date`, `item_code`, `item_name`, `qty`, `cost`, `added_user`) VALUES ";
$insert_rows = array();
//loop through item_code post data, inside this loop we will get other row data
foreach ($_POST['item_code'] as $k => $item_code_data) {

    $insert_fields = array($client_id, $item_date, $item_code_data, $_POST['item_name'][$k], $_POST['qty'][$k], $_POST['cost'][$k], $added_user);

    $insert_rows[] = implode("', '", $insert_fields);
}

if(count($insert_rows) > 0){
    $insert_rows_data = " ('" . implode("'), ('", $insert_rows) . "') ";
    mysqli_query($con, $query . $insert_rows_data);
}

```
I would need to see more of the code on the html side but my first thought is that the name is of each entry is being duplicated with no iterration. For example. If it adds a new tag with name="name" and the next one you add it also gives it name="name" where it should be adding a iteration like name= "name1" . After that the post page needs to be able to get all post data with variable names of an unknown quantity. . I have had good luck with while(isset($\_POST) and then a for loop to iterate over the name variable. But i would need to see a more complete code set