problem with implode()
Posted: Sun Feb 17, 2008 5:19 pm
Hi there,
i've got a very simple database that is displayed in a html table. each entry in the table has a unique id which is the primary key, each row in the table has a checkbox.
This is part of the code that loads data into the table (php while loop, $ID is ID of entry)
Once the user has made his selection the editform is called up in a separate window using this javascript function:
editform.php then proceeds to get the array with the value of the checkboxes like this:
which is supposed to give me a variable containing the id of the entry the user has selected via the checkbox.
This does not work. this is the error message i am getting:
Warning: implode() [function.implode]: Invalid arguments passed in C:\xampp\htdocs\editform.php on line 33
i am a bit stuck, is there an alternate way to pass the id to the editform, or a way to get the implode function working in this context? any help would be greatly appreciated.
i've got a very simple database that is displayed in a html table. each entry in the table has a unique id which is the primary key, each row in the table has a checkbox.
This is part of the code that loads data into the table (php while loop, $ID is ID of entry)
Code: Select all
echo "<tr> <td> <input type=checkbox name='check[]' value='$ID'> </td>";Code: Select all
function OpenWindow()
{
window.open(editform.php,'mywindow','width=400,height=300');
header("Location: http://localhost/");
}Code: Select all
$check = $_REQUEST['check'];
$idlist = implode(",", $check);This does not work. this is the error message i am getting:
Warning: implode() [function.implode]: Invalid arguments passed in C:\xampp\htdocs\editform.php on line 33
i am a bit stuck, is there an alternate way to pass the id to the editform, or a way to get the implode function working in this context? any help would be greatly appreciated.