Jump to content

php + checkbox


powaz

Recommended Posts

I have problem with array...

 

Maybe somebody know how to send to ch.php arrary of checkbox's not only one value? ???

I'm doing like this but only one value i can be sended.... :(

 

while ($row = mysql_fetch_array($query)){

echo '<form action="ck.php" method="post">';

echo '<tr><td><input type="checkbox" name="box[]" value="'.$row["cID"].'">'.$row["cID"].'</td>';

....

echo '<td>'.$row["price"].'</td>';

}

echo '</tr><tr><td><input type="submit" value="DELETE"/></td><td><a href="new.htm">new</a></td></tr>';

echo '</form></table>';

}

 

ck.php

<? $id=$_POST['box'][0]; ?>

 

 

Thanx for your answers

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/51177-php-checkbox/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.