| | |
Php Hurdle
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Consider the following:
Hope this would help.
<?php
if(isset($_POST['btnDelete'])){
for($i=1;$i<=4;$i++){
if(isset($_POST['checkbox'.$i])){
echo "<br>".$_POST['checkbox'.$i];
}
}
}
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form name="form1" method="post" action="">
<table width="301" height="129" border="1" cellpadding="0" cellspacing="1">
<tr>
<td width="21"><strong>Sl</strong></td>
<td width="245"><strong>Item</strong></td>
<td width="31"><strong>Tick</strong></td>
</tr>
<tr>
<td>1</td>
<td>Apple</td>
<td><input type="checkbox" name="checkbox1" value="Apple"></td>
</tr>
<tr>
<td>2</td>
<td>Baby</td>
<td><input type="checkbox" name="checkbox2" value="Baby"></td>
</tr>
<tr>
<td>3</td>
<td>Cat</td>
<td><input type="checkbox" name="checkbox3" value="Cat"></td>
</tr>
<tr>
<td>4</td>
<td>Dog</td>
<td><input type="checkbox" name="checkbox4" value="Dog"></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="btnDelete" value="Delete"></td>
<td> </td>
</tr>
</table>
</form>
</body>
</html>Hope this would help.
IF SOMEONE FEELS THAT THEY HAD NEVER MADE A MISTAKE IN THEIR LIFE, THEN IT MEANS THEY HAD NEVER TRIED A NEW THING IN THEIR LIFE
![]() |
Similar Threads
- Looking for offshore developers for fulltime work (Web Development Job Offers)
- I need a great web designer and proffesional PHP Coder ~ 10k project (Web Development Job Offers)
- can't link to included files... y? (C++)
- combo box (PHP)
Other Threads in the PHP Forum
- Previous Thread: php -> classes problem
- Next Thread: Connection problem
| Thread Tools | Search this Thread |
ajax apache api array beginner binary body broken cakephp checkbox class cms code cron curl database date date/time display dynamic echo email error file files folder form forms function functions gc_maxlifetime global google host href htaccess html image include insert integration ip java javascript joomla limit link list login loop mail memmory menu mlm msqli_multi_query multiple mycodeisbad mysql navigation oop parameter parsing paypal pdf php problem query radio random recourse recursion regex registrationform remote script search seo server sessions sms soap source space sql static syntax system table tutorial update upload url validator variable video web webdesign wordpress xml youtube





