foreach($_SESSION["basket_array"] as $each_item){
(mysql_query("UPDATE book SET copies=copies-1 WHERE bookid='$bookid'");
}
You're not setting $bookid
inside your query, so every time the query runs, it's updating the same row. You need to change that as you iterate through the loop:
foreach($_SESSION["basket_array"] as $each_item){
$bookid = $each_item['bookid'];
(mysql_query("UPDATE book SET copies=copies-1 WHERE bookid='$bookid'");
}
A couple of other things you might want to consider - you're not checking that your query actually worked, so if there's an issue with the connection, you'll never know about it.
You might also want to look at switching to PDO or mysqli_ functions. They both let you use prepared statements. They will help you write more secure code, and in a case like this, where you're running the same statement several times in a loop, they'll do it more efficiently, too.