mercredi 18 novembre 2015

How to mass checkbox import?

My script:

<form action="admin.php?get=add" method="post">

......

foreach($videos['videos'] as $v){

$id = $v['video']['id']; $title = $v['video']['title'];

echo "

           <tr class=\"odd\">
           <td><input name=\"id[]\" type=\"checkbox\" value=\"{$title}\"></td>
           <input name=\"title[$id]\" type=\"hidden\" value=\"{$title}\">";

I want to import entries checked the box (checkbox)

$_POST Sends me correctly titles


    Array
(
    [title] => Array
        (
            [1364] => title 1
            [1365] => title 2
            [1366] => title 3

        )

    [id] => Array
        (
            [0] => 1366
        )

    [submit] => import

how to display only selected checkbox?

ID is fine but gets me all titles

help..




Aucun commentaire:

Enregistrer un commentaire