 |
|
|  |
PHP ¼±ÅÃµÈ ´Ù¼ö(¿©·¯°³)ÀÇ Ã¼Å©¹Ú½º °ª ³Ñ±â±â |
|
|
 |
13³â Àü |
ȸ¿ø ¸®½ºÆ®(¸ñ·Ï)³ª, °Ô½ÃÆÇ ¸®½ºÆ®¸¦ »ç¿ëÇÏ´Ù º¸¸é üũ¹Ú½º¸¦ ÀÌ¿ëÇؼ ´Ù¼öÀÇ È¸¿ø¿¡°Ô ¸ÞÀÏÀ» º¸³»°Å³ª, ¿©·¯°³ÀÇ ±ÛÀ» Çѹø¿¡ »èÁ¦ÇØ¾ß ÇÒ Çʿ伺ÀÌ ÀÖ½À´Ï´Ù. ¾Æ·¡ÀÇ ¿¹Á¦´Â ¿©¼¸°³ÀÇ ¸ñ·Ï Áß Ã¼Å©¹Ú½º¸¦ ÀÌ¿ëÇؼ ¼±ÅÃµÈ °ªÀÌ ¾î¶² °ªÀΰ¡¸¦ º¸¿©ÁÖ´Â °¡Àå ªÀº ¿¹Á¦ÀÔ´Ï´Ù. ½ÇÁ¦ÀÇ ¸®½ºÆ® ó¸® °°Àº °æ¿ì¿¡´Â µ¥ÀÌÅͺ£À̽º¿¡¼ ¸ñ·ÏÀ» °¡Á®¿À°í ¼±ÅÃµÈ ¸ñ·ÏÀ» ó¸®ÇÏ°í ÀÚ ÇÏ´Â ÆäÀÌÁö·Î º¸³½ µÚ Çѹø¿¡ update³ª delete ¶Ç´Â ¸ÞÀÏ Àü¼ÛÀ» ÇÏ°Ô µÇ´Âµ¥, ±âº» ó¸® ¹æ¹ýÀº ¾Æ·¡ÀÇ ¿¹Á¦¿¡¼ Å©°Ô ¹þ¾î³ªÁö´Â ¾Ê½À´Ï´Ù.
<!--- Àü¼ÛÇÒ ÆäÀÌÁö (¸ñ·ÏÆäÀÌÁö ) --->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr" />
<title>¹«Á¦ ¹®¼</title>
<script type="text/javascript">
<!--
function checkForm(frm){
var chkbox = frm['chkbox[]'];
var cnt = 0;
for (var i = 0 ; i < chkbox.length; i++) {
if (chkbox[i].checked) {
cnt++;
}
}
if(cnt == 0){
window.alert("üũ¹Ú½º Á» ¼±ÅÃÇغÁ!");
return;
}
document.frmList.action = "checkbox_ok.php";
document.frmList.submit();
}
//-->
</script>
</head>
<body>
<form name="frmList" method="POST" action="javascript:checkForm(document.frmList);">
<table width="390" border="1">
<tr>
<td width="40" align="center"> ¼±ÅÃ</td>
<td width="50" align="center"> ¹øÈ£</td>
<td width="200" align="center"> À̸§</td>
</tr>
<?php
$robot_name = array( "±âµÕÀü»ç °ï´ã", "¸¶Â¡°úZ", "·Îº¸Æ®ÅðßV", "Çö´ë±×·£´ÙÀÌÁ®", "Âô°¡", "µ¶¼ö¸®6ÇüÁ¦" );
for($i=0; $i<6; $i++){?>
<tr>
<td> <input type="checkbox" name="chkbox[]" value="<?=$i?>" /></td>
<td width="50" align="right"> <?=$i?></td>
<td width="200"> <input type="hidden" name="rname[]" value="<?=$robot_name[$i]?>"/><?=$robot_name[$i]?></td>
</tr>
<?php }?>
<tr>
<td colspan="5" align="right"><input type="submit" name="Submit" value="Àü¼Û" /></td>
</tr>
</table>
</form>
</body>
</html>
==========================================================
<?php
//¹Þ´Â ÆäÀÌÁö
for($i=0;$i<count($chkbox);$i++){
echo$chkbox[$i].$rname[$i]."</br>";
}
?>
|
|
̵̧ : 546 |
̵̧
¸ñ·Ï
|
|
|  |
|