Jump to content

Setting a zero Quantity in a shopping cart problem


jayteepics

Recommended Posts

Nothing I have tried over the last 2 days has gotten anywhere near fixing this problem.

 

I've been learning about shopping carts from the Welling & Thomson PHP and MySQL Web Dev. book (fourth ed.)

 

The project I am learning from is a shopping cart for books. Ordinarily, the supplied code would work IF all books have an ISBN. However books prior to some time in the seventies don't have an ISBN.

 

So rather than devise a book code, with some trepidation, I used a book's 'title' as the DB primary key.

Everything works except the removal of a book from the shopping cart i.e. setting the quantity on the form to '0'.

 

This is snippets of the setup for the show_cart form.

 

 

    <form action=\"show_cart.php\" method=\"post\">

    ...

    ...

 

 

    echo "<td align=\"left\">

          <a href=\"show_book.php?title=".$title."\">".$book['title']."</a>

          by ".$book['author']."</td>

          <td align=\"center\">&pound".number_format($book['price'], 2)."</td>

          <td align=\"center\">";

 

    // if we allow changes, quantities are in text boxes

    if ($change == true) {

      echo "<input type=\"text\" name=\"".$title."\" value=\"".$qty."\" size=\"3\">";    } else {

      echo $qty;

    }

    echo "</td><td align=\"center\">&pound".number_format($book['price']*$qty,2)."</td></tr>\n";

  }

 

  ...

  ...

 

  if($change == true) {

    echo "<tr>

          <td colspan=\"".(2+$images)."\"> </td>

          <td align=\"center\">

            <input type=\"hidden\" name=\"save\" value=\"true\"/>

                <input type=\"image\" src=\"images/save-changes.gif\"

                    border=\"0\" alt=\"Save Changes\"/>

          </td>

          <td> </td>

          </tr>";

  }

 

I then run the scripts and choose a couple of books for my cart THEN make one of the quantity fields zero and execute the following in show_cart.php which is more or less identical to the script in the book however my key is $title as opposed to $isbn.

 

  if(isset($_POST['save'])) {

    foreach ($_SESSION['cart'] as $title => $qty) {

      if ($_POST[$title] == '0') {

        unset($_SESSION['cart']['$title']);

      }

      else {

        $_SESSION['cart'][$title] = $_POST[$title];

      }

    }

 

    $_SESSION['total_price'] = calculate_price($_SESSION['cart']);

    $_SESSION['items'] = calculate_items($_SESSION['cart']);

 

  } 

 

The RESULT is all books disappear from the cart

 

Any suggestions would be gratefully received.

 

Jamie

 

 

Link to comment
Share on other sites

use the CODE tags please....

 

I can only guess you mean show the PHP tags so here if the function code..and the show_cart.php is attached.

 

Jamie

  </table>
<?php
}

function display_cart($cart, $change = true, $images = 1) {
  // display items in shopping cart
  // optionally allow changes (true or false)
  // optionally include images (1 - yes, 0 - no)

   echo "<table border=\"0\" width=\"100%\" cellspacing=\"0\">
         <form action=\"show_cart.php\" method=\"post\">
         <tr><th colspan=\"".(1 + $images)."\" bgcolor=\"#e8e8e8\">Item</th>
         <th bgcolor=\"#C9C9C9\">Price</th>
         <th bgcolor=\"#C9C9C9\">Quantity</th>
         <th bgcolor=\"#C9C9C9\">Total</th>
         </tr>";

  //display each item as a table row

   foreach ($cart as $title => $qty)  {
//  $title = mysql_prep($title);

    $book = get_book_details($title);
    echo "<tr>";
    if($images == true) {
      echo "<td align=\"left\">";
      if (file_exists("images/".$image.".jpg")) {
         $size = GetImageSize("images/".$image.".jpg");
         if(($size[0] > 0) && ($size[1] > 0)) {
           echo "<img src=\"images/".image.".jpg\"
                  style=\"border: 1px solid black\"
                  width=\"".($size[0]/3)."\"
                  height=\"".($size[1]/3)."\"/>";
         }
      } else {
         echo " ";
      }
      echo "</td>";
    }
    echo "<td align=\"left\">
          <a href=\"show_book.php?title=".$title."\">".$book['title']."</a>
          by ".$book['author']."</td>
          <td align=\"center\">&pound".number_format($book['price'], 2)."</td>
          <td align=\"center\">";

    // if we allow changes, quantities are in text boxes
    if ($change == true) {
      echo "<input type=\"text\" name=\"".$title."\" value=\"".$qty."\" size=\"3\">";
    } else {
      echo $qty;
    }
    echo "</td><td align=\"center\">&pound".number_format($book['price']*$qty,2)."</td></tr>\n";
  }
  // display total row
  echo "<tr>
        <th colspan=\"".(2+$images)."\" bgcolor=\"#e8e8e8\"> </td>
        <th align=\"center\" bgcolor=\"#C9C9C9\">".$_SESSION['items']."</th>
        <th align=\"center\" bgcolor=\"#C9C9C9\">
            &pound".number_format($_SESSION['total_price'], 2)."
        </th>
        </tr>";

  // display save change button
  if($change == true) {
    echo "<tr>
          <td colspan=\"".(2+$images)."\"> </td>
          <td align=\"center\">
             <input type=\"hidden\" name=\"save\" value=\"true\"/>
             <input type=\"image\" src=\"images/save-changes.gif\"
                    border=\"0\" alt=\"Save Changes\"/>
          </td>
          <td> </td>
          </tr>";
  }
  echo "</form></table>";
}

function display_login_form() {
  // dispaly form asking for name and password
?>

 

MOD EDIT: code tags added.

 

[attachment deleted by admin]

Link to comment
Share on other sites

What he meant, even though he couldn't be bothered to provide any kind of example, is to enclose your code within the forum's

 . . . 

BBCode tags.

 

Pikachu2000.

 

Thank You for your explanation.

 

Does your assistance mean that my question is now 'properly formed' to be able to ask for assistance?

 

I really still have to learn more about BBCode tags also....notwithstanding PHP, MySQL / Apache 2.2 on Win7.

 

I'm an old mainframe guy and lecturer to boot just trying to learn new stuff and I was very surprised to be presented with hurdles just to ask for help.

 

Notwithstanding this ignorance, if I have not provided, (even with your help), enough detail for my problem to be considered by the forum, then can someone help me phrase my problem appropriately to suit the protocol required please?

 

Thank You for your help Pikachu2000

 

Jamie

Link to comment
Share on other sites

Hi

 

Not sure but one problem is the following line:-

 

unset($_SESSION['cart']['$title'])

 

You have $title within single quotes so it is trying to unset an array member with the key of $title rather than the key with the value of $title.

 

However I would expect that to mean nothing gets set to zero rather than the whole cart wiped out.

 

All the best

 

Keith (another ex mainframe programmer)

Link to comment
Share on other sites

The thing with using the

 . . . 

tags to enclose code is that your code is given syntax highlighting, making it easier for others to read through. The easier it is for people to help you, the more likely they'll actually do so.

 

As for your question, To get a better idea of the data your form is passing, add the following lines near the top of the script that handles the form processing and post the output it generates.

 

echo '<pre>';
print_r($_POST);
echo '</pre>'

Link to comment
Share on other sites

The thing with using the

 . . . 

tags to enclose code is that your code is given syntax highlighting, making it easier for others to read through. The easier it is for people to help you, the more likely they'll actually do so.

 

As for your question, To get a better idea of the data your form is passing, add the following lines near the top of the script that handles the form processing and post the output it generates.

 

echo '<pre>';

print_r($_POST);

echo '</pre>'

 

 

Pikachu2000, I'm all for getting my question focussed to the entire community and in that regard I very much appreciate your help.

 

I added your code at the top of 'show_cart.php' as follows...

 

 

Added ... to the top of show_cart.php

 

<?php

  include ('book_sc_fns.php');

  // The shopping cart needs sessions, so start one

  session_start();

 

 

echo '<pre>';

print_r($_POST);

echo '</pre>';

 

Chose 3 books for the cart and then changed the quantity of the 'PHP and Web Dev' book to zero and clicked 'Save Changes'...

 

 

without removing the quotes around '$title' the result was...

 

Array

(

    [in_Search_of_Unknown_Britain] => 1

    [php_and_MySQL_Web_Development] => 0

    [The_Jagged_Nerves] => 1

    [save] => true

    [x] => 67

    [y] => 28

)

 

  Total Items = 0 

Total Price = £0.00 

 

The result was ...

 

 

Your shopping cart

There are no items in your cart

 

 

 

After removing the quotes around $title as per Keith's suggestion (Thanks Keith)...

 

Array

(

    [in_Search_of_Unknown_Britain] => 1

    [php_and_MySQL_Web_Development] => 0

    [The_Jagged_Nerves] => 1

    [save] => true

    [x] => 49

    [y] => 24

)

 

  Total Items = 0 

Total Price = £0.00 

 

Your shopping cart

There are no items in your cart

 

 

 

 

 

 

Link to comment
Share on other sites

What he meant, even though he couldn't be bothered to provide any kind of example, is to enclose your code within the forum's

 . . . 

BBCode tags.

 

I see, I wasn't clear enough, sorry OP..

 

edit: You are still not using the 

 . . . 

 

OK here is the post again with the 3 lines of code I was recommended to add hopefully with the correct protocol this time.

 

Many Thanks

 

Jamie

 


echo '<pre>';
print_r($_POST);
echo '</pre>';

 

Chose 3 books for the cart and changed the quantity of PHP and Web Dev to zero and clicked 'Save Changes'...

 

 

without removing the quotes around $title

 

Array

(

    [in_Search_of_Unknown_Britain] => 1

    [php_and_MySQL_Web_Development] => 0

    [The_Jagged_Nerves] => 1

    [save] => true

    [x] => 67

    [y] => 28

)

 

  Total Items = 0 

Total Price = £0.00 

 

Your shopping cart

There are no items in your cart

 

 

 

After removing the quotes around $title as per Keith's suggestion...

 

Array

(

    [in_Search_of_Unknown_Britain] => 1

    [php_and_MySQL_Web_Development] => 0

    [The_Jagged_Nerves] => 1

    [save] => true

    [x] => 49

    [y] => 24

)

 

  Total Items = 0 

Total Price = £0.00 

 

Your shopping cart

There are no items in your cart

 

 

 

 

Link to comment
Share on other sites

Hi

 

Can't see anything obvious (but not sure why you are using array_count_values).

 

Could you try doing the following:-

 

echo '<pre>';
print_r($_POST);
print_r($_SESSION);
echo '</pre>';

 

Wondering if the session variables have been already wiped out,

 

All the best

 

Keith

Link to comment
Share on other sites

Hi

 

Can't see anything obvious (but not sure why you are using array_count_values).

 

Could you try doing the following:-

 

echo '<pre>';
print_r($_POST);
print_r($_SESSION);
echo '</pre>';

 

Wondering if the session variables have been already wiped out,

 

All the best

 

Keith

 

Hi Keith,

 

Interesting result...

 

echo '<pre>';
print_r($_POST);
print_r($_SESSION);
echo '</pre>';

 

Result...

 

Array

(

    [in_Search_of_Unknown_Britain] => 1

    [php_and_MySQL_Web_Development] => 0

    [The_Jagged_Nerves] => 1

    [save] => true

    [x] => 47

    [y] => 22

)

Array

(

    [items] => 3

    [total_price] => 55.18

    [cart] => Array

        (

            [in Search of Unknown Britain] => 1

           

 => 1

            [The Jagged Nerves] => 1

        )

 

)

 

  Total Items = 0 

Total Price = £0.00 

 

Your shopping cart

There are no items in your cart

 

....

 

Jamie

Link to comment
Share on other sites

Hi

 

I would repeat the debugging that has been added and put it after each group of code to try and spot where $_SESSION is being cleared down

 

All the best

 

Keith

 

Here is the code now...

 

<?php
  include ('book_sc_fns.php');
  // The shopping cart needs sessions, so start one
  session_start();


echo '<pre>';
print_r($_POST);
print_r($_SESSION);
echo '</pre>';

//ini_set('display_errors', 1);
//error_reporting(E_ALL);
//
// these lines format the output as HTML comments
  // and call dump_array repeatedly

  echo "\n<!-- BEGIN VARIABLE DUMP -->\n\n";

  echo "<!-- BEGIN GET VARS -->\n";
  echo "<!-- ".dump_array($_GET)." -->\n";

  echo "<!-- BEGIN POST VARS -->\n";
  echo "<!-- ".dump_array($_POST)." -->\n";


  echo "<!-- BEGIN SESSION VARS -->\n";
  echo "<!-- ".dump_array($_SESSION)." -->\n";



  echo "<!-- BEGIN COOKIE VARS -->\n";
  echo "<!-- ".dump_array($_COOKIE)." -->\n";

  echo "\n<!-- END VARIABLE DUMP -->\n";

// dump_array() takes one array as a parameter
// It iterates through that array, creating a single
// line string to represent the array as a set
//end--------------------

  @$new = $_GET['new'];

  if($new) {
    //new item selected
    if(!isset($_SESSION['cart'])) {
      $_SESSION['cart'] = array();
      $_SESSION['items'] = 0;
      $_SESSION['total_price'] ='0.00';
    }

    if(isset($_SESSION['cart'][$new])) {
      $_SESSION['cart'][$new]++;
    } else {
      $_SESSION['cart'][$new] = 1;
    }

    $_SESSION['total_price'] = calculate_price($_SESSION['cart']);
    $_SESSION['items'] = calculate_items($_SESSION['cart']);
  }

    $saved_title = $title;

  if(isset($_POST['save'])) {
    foreach ($_SESSION['cart'] as $title => $qty) {
       if ($_POST[$title] == '0') {
        unset($_SESSION['cart']['$title']);
       
echo '<pre>';
print_r($_POST);
print_r($_SESSION);
echo '</pre>';


      }
      else {
        $_SESSION['cart'][$title] = $_POST[$title];
       
echo '<pre>';
print_r($_POST);
print_r($_SESSION);
echo '</pre>';


      }
    }

    $_SESSION['total_price'] = calculate_price($_SESSION['cart']);
    $_SESSION['items'] = calculate_items($_SESSION['cart']);
  }

  do_html_header("Your shopping cart");

  
echo '<pre>';
print_r($_POST);
print_r($_SESSION);
echo '</pre>';



  if(($_SESSION['cart']) && (array_count_values($_SESSION['cart']))) {
    display_cart($_SESSION['cart']);
  } else {
    echo "<p>There are no items in your cart</p><hr/>";
  }

  $target = "index.php";

  // if we have just added an item to the cart, continue shopping in that category
  if($new)   {
    $details =  get_book_details($new);
    if($details['catid']) {
      $target = "show_cat.php?catid=".$details['catid'];
    }
  }
  display_button($target, "continue-shopping", "Continue Shopping");

  // use this if SSL is set up
  // $path = $_SERVER['PHP_SELF'];
  // $server = $_SERVER['SERVER_NAME'];
  // $path = str_replace('show_cart.php', '', $path);
  // display_button("https://".$server.$path."checkout.php",
  //                 "go-to-checkout", "Go To Checkout");

  // if no SSL use below code
  display_button("checkout.php", "go-to-checkout", "Go To Checkout");

  do_html_footer();
?>

 

And rather wierd results at first glance....

 

Results...???

 

Array

(

    [in_Search_of_Unknown_Britain] => 1

    [php_and_MySQL_Web_Development] => 0

    [The_Jagged_Nerves] => 1

    [save] => true

    [x] => 39

    [y] => 18)

Array

(

    [items] => 3

    [total_price] => 55.18

    [cart] => Array

        (

            [in Search of Unknown Britain] => 1

           

 => 1

            [The Jagged Nerves] => 1

        )

 

)

 

Array

(

    [in_Search_of_Unknown_Britain] => 1

    [php_and_MySQL_Web_Development] => 0

    [The_Jagged_Nerves] => 1

    [save] => true

    [x] => 39

    [y] => 18

)

Array

(

    [items] => 3

    [total_price] => 55.18

    [cart] => Array

        (

            [in Search of Unknown Britain] =>

            [php and MySQL Web Development] => 1

            [The Jagged Nerves] => 1

        )

 

)

 

Array

(

    [in_Search_of_Unknown_Britain] => 1

    [php_and_MySQL_Web_Development] => 0

    [The_Jagged_Nerves] => 1

    [save] => true

    [x] => 39

    [y] => 18

)

Array

(

    [items] => 3

    [total_price] => 55.18

    [cart] => Array

        (

            [in Search of Unknown Britain] =>

            [php and MySQL Web Development] =>

            [The Jagged Nerves] => 1

        )

 

)

 

Array

(

    [in_Search_of_Unknown_Britain] => 1

    [php_and_MySQL_Web_Development] => 0

    [The_Jagged_Nerves] => 1

    [save] => true

    [x] => 39

    [y] => 18

)

Array

(

    [items] => 3

    [total_price] => 55.18

    [cart] => Array

        (

            [in Search of Unknown Britain] =>

            [php and MySQL Web Development] =>

            [The Jagged Nerves] =>

        )

 

)

 

  Total Items = 0 

Total Price = £0.00 

 

Your shopping cart

Array

(

    [in_Search_of_Unknown_Britain] => 1

    [php_and_MySQL_Web_Development] => 0

    [The_Jagged_Nerves] => 1

    [save] => true

    [x] => 39

    [y] => 18

)

Array

(

    [items] => 0

    [total_price] => 0.00

    [cart] => Array

        (

            [in Search of Unknown Britain] =>

            [php and MySQL Web Development] =>

            [The Jagged Nerves] =>

        )

 

)

 

There are no items in your cart

 

 

Many Thanks

 

Jamie

 

 

 

Link to comment
Share on other sites

Hi

 

If I am counting correctly I think that it has wiped out session somewhere in calculate_price() or calculate_items().

 

Can you post the code for those functions?

 

All the best

 

Keith

 

 


function calculate_price($cart) {
  // sum total price for all items in shopping cart
  $price = 0.0;
  if(is_array($cart)) {
    $conn = db_connect();
    foreach($cart as $title => $qty) {
      $query = "select price from books where title='".$title."'";
      $result = $conn->query($query);
      if ($result) {
        $item = $result->fetch_object();
        $item_price = $item->price;
        $price +=$item_price*$qty;
      }
    }
  }
  return $price;
}


function calculate_items($cart) {
  // sum total items in shopping cart
  $items = 0;
  if(is_array($cart))   {
    foreach($cart as $title => $qty) {
      $items += $qty;
    }
  }
  return $items;
}


?>

 

Jamie

Link to comment
Share on other sites

Hi

 

Afraid I am stumped.

 

Double checked and it does look like the session variables have been wiped out in those functions but can't see where.

 

All the best

 

Keith

 

Many Thanks Keith...

 

just for completeness here is ...  do_html_header($title = '')

 

 

<?php

function do_html_header($title = '') {
  // print an HTML header

  // declare the session variables we want access to inside the function
  if (!$_SESSION['items']) {
    $_SESSION['items'] = '0';
  }
  if (!$_SESSION['total_price']) {
    $_SESSION['total_price'] = '0.00';
  }
?>
  <html>
  <head>
    <title><?php echo $title; ?></title>
    <style>
      h2 { font-family: Arial, Helvetica, sans-serif; font-size: 22px; color: #664B4A; margin: 6px }
      body { font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: #664B4A }
      li, td { font-family: Arial, Helvetica, sans-serif; font-size: 13px }
      hr { color: #FF0000; width=70%; text-align=center}
      a { color: #000000 }
    </style>
  </head>
  <body>
  <table width="100%" border="0" cellspacing="0" bgcolor="#e8e8e8">
  <tr>
  <td rowspan="2">
  <a href="index.php"><img src="images/cclogo.png" alt="CleverCollecting" border="0"
       align="left" valign="bottom" height="55" width="315"/></a>
  </td>
  <td align="right" valign="bottom">
  <?php
     if(isset($_SESSION['admin_user'])) {
       echo " ";
     } else {
       echo "Total Items = ".$_SESSION['items'];
     }
  ?>
  </td>
  <td align="right" rowspan="2" width="135">
  <?php
     if(isset($_SESSION['admin_user'])) {
       display_button('logout.php', 'log-out', 'Log Out');
     } else {
       display_button('show_cart.php', 'view-cart', 'View Your Shopping Cart');
     }
  ?>
  </tr>
  <tr>
  <td align="right" valign="top">
  <?php
     if(isset($_SESSION['admin_user'])) {
       echo " ";
     } else {
       echo "Total Price = &pound".number_format($_SESSION['total_price'],2);
     }
  ?>
  </td>
  </tr>
  </table>
<?php

Link to comment
Share on other sites

From the previous output results, the only logical explanation for these results is the test for zero isn't working...

 

  if(isset($_POST['save'])) {
    foreach ($_SESSION['cart'] as $title => $qty) {
       if ($_POST[$title] == '0') {
        unset($_SESSION['cart'][$title]);
       
echo '<pre>';
print_r($_POST);
print_r($_SESSION);
echo '</pre>';


      }
      else {
        $_SESSION['cart'][$title] = $_POST[$title];

echo '<pre>';
print_r($_POST);
print_r($_SESSION);
echo '</pre>';


      }
    }

 

As it progresses through the array systematically unsetting the session cart variables 1 then 2 then 3..

 


       if ($_POST[$title] == '0') {
        unset($_SESSION['cart'][$title]);
       

 

when it is only the second book which has a quantity of zero?

 

 

[attachment deleted by admin]

Link to comment
Share on other sites

Could you change the print_r debugging code to the following so that the different arrays are distinctly identified -

echo '<pre>';
echo "Post:"
print_r($_POST);
echo "Session:";
print_r($_SESSION);
echo '</pre>';

 

Also, what does a phpinfo(); statement show for the register_globals setting?

Link to comment
Share on other sites

Yes I already had to do that for myself ;-)

 

Here is the output:-

 

Post Array

(

    [in_Search_of_Unknown_Britain] => 1

    [php_and_MySQL_Web_Development] => 0

    [The_Jagged_Nerves] => 1

    [save] => true

    [x] => 57

    [y] => 26

)

Session Array

(

    [items] => 3

    [total_price] => 55.18

    [cart] => Array

        (

            [in Search of Unknown Britain] => 1

           

 => 1

            [The Jagged Nerves] => 1

        )

 

)

 

Post Array

(

    [in_Search_of_Unknown_Britain] => 1

    [php_and_MySQL_Web_Development] => 0

    [The_Jagged_Nerves] => 1

    [save] => true

    [x] => 57

    [y] => 26

)

Session Array

(

    [items] => 3

    [total_price] => 55.18

    [cart] => Array

        (

            [in Search of Unknown Britain] =>

            [php and MySQL Web Development] => 1

            [The Jagged Nerves] => 1

        )

 

)

 

Post Array

(

    [in_Search_of_Unknown_Britain] => 1

    [php_and_MySQL_Web_Development] => 0

    [The_Jagged_Nerves] => 1

    [save] => true

    [x] => 57

    [y] => 26

)

Session Array

(

    [items] => 3

    [total_price] => 55.18

    [cart] => Array

        (

            [in Search of Unknown Britain] =>

            [php and MySQL Web Development] =>

            [The Jagged Nerves] => 1

        )

 

)

 

Post Array

(

    [in_Search_of_Unknown_Britain] => 1

    [php_and_MySQL_Web_Development] => 0

    [The_Jagged_Nerves] => 1

    [save] => true

    [x] => 57

    [y] => 26

)

Session Array

(

    [items] => 3

    [total_price] => 55.18

    [cart] => Array

        (

            [in Search of Unknown Britain] =>

            [php and MySQL Web Development] =>

            [The Jagged Nerves] =>

        )

 

)

 

  Total Items = 0 

Total Price = £0.00 

 

Your shopping cart

Post Array

(

    [in_Search_of_Unknown_Britain] => 1

    [php_and_MySQL_Web_Development] => 0

    [The_Jagged_Nerves] => 1

    [save] => true

    [x] => 57

    [y] => 26

)

Session Array

(

    [items] => 0

    [total_price] => 0.00

    [cart] => Array

        (

            [in Search of Unknown Britain] =>

            [php and MySQL Web Development] =>

            [The Jagged Nerves] =>

        )

 

)

 

There are no items in your cart

 

 

Link to comment
Share on other sites

The array indexes between the post and session arrays are not the same (spaces vs underscores), so the current logic is setting the session variables to nulls (non-existent post variables.)

 

I'm going to guess this is because of some missing quotes in the form's html markup/php converting array index names to valid php variable names.

 

Could you post the code that is generating the form? (edit: I guess that is the display_cart() function. I'll take a look at what it is doing....)

Link to comment
Share on other sites

This problem is because php converts spaces and dots in post/get variable names (i.e. name="... ..." attributes) into underscores.

 

The method being used in the code you are trying to use is not very good. The name="" attributes should not be the $title. They should be an array with the index either being the $title or better yet, the id of the book.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.