Suppose i have a database that store report from employees which first column is reportID(auto increment), staffID,name,department and so on.
Everytime i submit i report from my php page it will display increment number (reportID) in my php page. So lets say i got 3 report ID stored in the table, i want to delete three record, and then add 1 new record to the table, but now the reportID display as 4 because the past three reportID are 1,2,3, so how do i reset the new record to 1 instead of 4? is there a code to reset it? This is my deletereport.php
<?php
include('adminconfig.php');
include('config.php');
$reportID = mysql_real_escape_string($_GET['id']);
$sql="DELETE FROM `report` WHERE `reportID`='$reportID'";
$result=mysql_query($sql);
if(!$result){
die('invalid query:'.mysql_error());
}
else
?>
<p style="font-family:arial;color:#0066CC;font-size:30px;">One row deleted...</p>
<?php
header('Refresh:3; url=viewreportdb.php');
die;
?>