Hello,
How can display the list of checked checkbox according to database value? So when the uses want to edit the info, he/she knows that which are the one already being check.
ok this is my form
<form action="submit.php" method="post">
<input type="checkbox" name="book[]" value="love">
<input type="checkbox" name="book[]" value="business">
<input type="checkbox" name="book[]" value="computer">
<input type="checkbox" name="book[]" value="arts">
<input type="checkbox" name="book[]" value="sports">
<input type="checkbox" name="book[]" value="gardening">
<input type="checkbox" name="book[]" value="fishing">
<input type="checkbox" name="book[]" value="marketing">
<input type="submit" value-"submit">
-------------------------------------------------------
This will than send to a submit.php with implode
$bookreceived = implode("-", $book);
$book_query="UPDATE bookstore SET book='$bookreceived' WHERE nameid='$nameid' ;
$book_result = mysql_query($book_query) ;
-------------------------------------------------
Now, the user going to edit this book selections, I want to let him know which are the book he have checked. So.. how to apply your code over to my?
thanks alot.
How can display the list of checked checkbox according to database value? So when the uses want to edit the info, he/she knows that which are the one already being check.
ok this is my form
<form action="submit.php" method="post">
<input type="checkbox" name="book[]" value="love">
<input type="checkbox" name="book[]" value="business">
<input type="checkbox" name="book[]" value="computer">
<input type="checkbox" name="book[]" value="arts">
<input type="checkbox" name="book[]" value="sports">
<input type="checkbox" name="book[]" value="gardening">
<input type="checkbox" name="book[]" value="fishing">
<input type="checkbox" name="book[]" value="marketing">
<input type="submit" value-"submit">
-------------------------------------------------------
This will than send to a submit.php with implode
$bookreceived = implode("-", $book);
$book_query="UPDATE bookstore SET book='$bookreceived' WHERE nameid='$nameid' ;
$book_result = mysql_query($book_query) ;
-------------------------------------------------
Now, the user going to edit this book selections, I want to let him know which are the book he have checked. So.. how to apply your code over to my?
thanks alot.