PHP 코드에서 jQuery를 모바일 체크 박스 그룹의 가치를 (필자는이 링크에 jQuery를 모바일 체크 박스 그룹에서 샘플 예제를 발견 http://jsfiddle.net/Palestinian/2yjgg/)내가 PHP 코드 jQuery를 모바일 코드에서 jQuery를 모바일 응용 프로그램에서 체크 박스 그룹의 값을 얻으려면
<div data-role="page" id="attend" >
<p>Choose Student who attende:</p>
<div id='group_checkboxes'></div>
<form method="post" action="sign_up3.php" target="_new" >
<script>
$("#attend").live("pageinit",function(event){
var checkboxes = '';
for (i = 0; i <= 5; i++) {
checkboxes += '<input type="checkbox" id="foo' + i + '" class="custom" name="attend_list[]" /><label for="foo' + i + '">Foo checkbox' + i + '</label>';
}
var controlgroup = $("<fieldset/>", {"data-role": "controlgroup"}).append(checkboxes);
$("#group_checkboxes").append(controlgroup.controlgroup());
$("[type=checkbox]").checkboxradio();
$("[data-role=controlgroup]").controlgroup("refresh");
});
</script>
<input type="submit" value="submit" >
</form>
</div>
PHP 코드
<?php
foreach($_POST['attend_list'] as $value)
{
echo $value ;
}
?>
하지만 PHP 코드 쇼이 오류를 제출할 때
"주의 : 정의되지 않은 인덱스 : C에서 attend_list : \ XAMPP \ htdocs를 \ AT & T는 \ sign_up3.php 라인에 3
경고 : \ XAMPP \ htdocs를 \ ATT \ sign_up3.php : C에서 foreach는()에 대한 공급 잘못된 인수
<div id='group_checkboxes'></div>
양식에 : 라인 3 "
이 링크에서이 파일을 찾았습니다. http://jsfiddle.net/Palestinian/2yjgg/ – Beshoy