RE: [PHP-WIN] forms
| From: | Asendorf, John | Date: | Thu, 04 Jan 2001 13:24:39 +0000 |
| Subject: | RE: [PHP-WIN] forms | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-4799@lists.php.net to get a copy of this message | ||
You can do something like this:
whatever_the_command_to_unserialize_your_data_is ($bn);
<input type="checkbox" name="Choice" value="A" <?PHP if (
$bn[0]== "A" ) {
echo "CHECKED" } ?> >
---------------------
John Asendorf - jasendorf@lcounty.com
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
The benefit to the government of replacing all $1 Federal Reserve notes with
$1 coins would be $522.2 million per year, according to estimates of the
General Accouting Office released on April 7, 2000.
> -----Original Message-----
> From: JND Designs [mailto:jobs@jnddesigns.net]
> Sent: Wednesday, January 03, 2001 9:50 AM
> To: php-windows@lists.php.net
> Subject: [PHP-WIN] forms
>
>
> Hi,
> I have a form that has three checkboxes.
> A,B&C.
> Data from A & C has been entered into the database by
> serializing it.
> I now want to create a edit form where the user can
> view his choices ticked.
>
> <form action="postoDb.php">
> A<input type="checkbox" name="Choice[]" value="A">
> B<input type="checkbox" name="Choice[]" value="B">
> C<input type="checkbox" name="Choice[]" value="C">
> </form>
>
> //postodb.php
> $bn = serialize($Choice);
> sql ="insert into table (choice) values('$bn')";
> .......
>
> thanks,
> Jason
>