Hiya Everyone,
I currently have the following code that outputs all information contained in a table to the screen, whilst displaying a check box beside each one.
Upon a record being selected and the submit button being clicked, how do I use a Query String to delete a record using an ID, but then re-number the ID column to reflect the number of records stored in the table?Code:<?php $con = mysql_connect("localhost","peter","abc123"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("WB", $con); $result = mysql_query("SELECT * FROM Birds"); if(mysql_error() != 0 || mysql_num_rows($result) == 0) { die("No database, or no data"); } while($row = mysql_fetch_object($result)) { echo $row->Name; echo $row->Species; echo $row->Sex; echo "<input type='checkbox' name='' />"; } echo "<input type='submit' value='Submit' />"; ?>
How do I do all the processing on the same page?










Bookmarks