dpps0715 2011-03-22 19:53
浏览 15

在php中通过邮件获取复选框值

I'm getting database from database and each row has a id and im showing it like this in html

<td><input type="checkbox" value"1">test1</td></tr>    
<td><input type="checkbox" value"2">test2</td></tr>  

and so on...

now lets say that user checked ten check boxes out of 15 and then clicked submit .
how to get values of those boxes in php???

  • 写回答

4条回答 默认 最新

  • dqc18251 2011-03-22 19:56
    关注

    give the checkboxes names:

    <td><input type="checkbox" value"2" name='test'>test2</td></tr>  
    

    Than in php just read the request

    $test = $_REQUEST['test']
    

    if the OP doesn't have these checkboxes inside of a , any amount of PHP code will make absolutely no difference (FROM Blender)

    评论

报告相同问题?