Code:
<html> <head><title>Mainpage</title></head> <body> <table border = "1"> <th>S.No.</th> <th>Select row</th> <th>Consultant Name</th> <th>Consultant Location</th> <th>Consultant Job Title</th> <th>Consultant SKILLS</th> <th>Consultant Summary</th> <th>Consultant Rate</th> <th>Consultant Relocate</th> <th>Consultant Last Assignment Date</th> <th>Consultant Resume</th> <?php $file = fopen("users.txt", "r") or exit("Unable to open file!"); for($i=1; $i<=10; $i++) { ?> <tr><td><?echo $i?></td> <td> <input type="radio" name="select" value="<?echo $i;?>"/> <? echo "</td>"; for($j=1; $j<=9; $j++) { $test = fgets($file); echo "<td>"; echo "$test"; echo "</td>"; } echo "</tr>"; } fclose($file); ?> </table> <a href="form.php"><font size="2">Add</font></a> <form action="mainpage.php" name="form"<?echo $i?> method="post"> <input type="hidden" name="variablename" value=".$i."/> <input type="submit" value="Delete"/> </form> </body> </html>
however on clicking the delete button the selected row is not deleted
any suggestions??
Comment