Afficher un message
Vieux 15/03/2008, 06h18   #7
John Taylor-Johnston
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] Re: <input type="checkbox">

Sorry, will this work?

$sql ='insert into `database`.`table` (`Nom` ,`checkregion`)
values ('John', '".serialise($_POST['checkregion'])."') ';


John Taylor-Johnston wrote:
> Will this do it?
>
> > $sql ='insert into `database`.`table` (`Nom` ,`checkregion`)
> > values ('John', '".implode(',', serialise($_POST['checkregion'])."') ';

>
> http://ca.php.net/manual/en/function.serialize.php
>
>
>> Array
>> (
>> [0] => Hemmingford
>> [1] => Huntingdon
>> )
>>
>>> <input type="checkbox" name="checkregion[]" value="Knowlton" />
>>> <input type="checkbox" name="checkregion[]" value="Thetford Mines" />

  Réponse avec citation
 
Page generated in 0,04661 seconds with 9 queries