2009. 10. 13.

checkbox 배열값 php 로 쉽게 받기.

html에서 작성한 checkbox element 이름

 

cd[]

 

 

 

php 에서 받기.

 

 

 $ArrayCd   = isset($_POST['cd']) && $_POST['cd'] ? $_POST['cd'] : false;

 

 foreach($ArrayCd as $filename) {

    echo   $filename;
 }

 

 

 

차암.. 쉽져잉..

2 개의 댓글:

서종훈 :

에러나는데요;;;

조림 :

element id 말고 name 으로 해야되요

Archive

prof

With you not around it’s a little bit more than I can stand. Don’t tell me I ran out of time If it takes the rest of my life.