Array get method in meta redirect

greetings!


for($i = 0 ; $i < count($book); $i++)
{

$books = $book[$i];
mysql_query("UPDATE tbl_bacquisition SET ba_Status = 'T1' WHERE id = '$bookac'") or die (mysql_error());							

echo "<meta http-equiv=\\"refresh\\"content=\\"0;URL=Borrow_success.php?books[]=".$books."\\">";	

}

I have a problem in passing array variable after updating my table. It shows only a single value of array.
Any help will do. Thank you .

Hi claro

When you do this

$books = $books[$i]

you get a multidimensional array. To not get a multidimensional array do this:


$books[] = $i;

Steve

thank you very much steve. It works now.

But I found a new error it says like this:


Fatal error: Maximum execution time of 60 seconds exceeded in C:\\xampp\\htdocs\	ransaction\\Borrow_success.php  on line 14

What does it mean. Its my first time to encounter that error.

Hi,
I think that error appears when the script processes the code in the file for more then 60 seconds, or, perhaps it runs into an infinite loop, or redirect again and again to same file.

Without seeing more of your code we’re not going to be able to give you a good idea of what’s causing this but, take a look at your loop and find out what is determining $book, make sure it’s not auto-incrementing with the rest of your loop since that error tends to indicate an infinite loop.

HERE IS MY CODE.


<?php
include'../connection/connect-db.php';
$book = $_GET['books'];
for($i = 0 ; $i < count($book); $i++)
{
$book[] = $i;

$query2 = mysql_query("SELECT * , tbl_book.id AS bid, tbl_bacquisition.id AS bac
						   FROM tbl_book, tbl_bacquisition, tbl_bdetail
						  WHERE tbl_bacquisition.ba_Accnum = '$book'
						  AND tbl_bacquisition.bd_Id = tbl_bdetail.id
					         AND tbl_book.id = tbl_bdetail.b_Title") or die(mysql_error());
										
}