Your form should look like this:
<form ...>
<input type="hidden" name="student" value="$row['student']" />
<input type="submit" name="delete" value="Delete" />
</form>
Then you can get which student to delete on deletestudent.php via $_POST['student']. (you can use
isset($_POST['delete']) to see if they clicked "Delete" but $_POST['delete'] will hold the value "Delete").
The id attribute in html is used for javascript or CSS to select that particular element.
Last edited by humbug; May 7th, 2009 at 4:05 am. Reason: premature post :P
Reputation Points: 20
Solved Threads: 13
Junior Poster in Training
Offline 93 posts
since Oct 2005