Hi
Plz help i'm new i want to edit a record from the database using the html form that comes with the record on the field when i click edit and be able to delete it when i click a delete i want a pop up message to ask if i'm sure.
Below its what i have done
//Insert data into the database
$query= "INSERT INTO Client(Name,Email, Comment) VALUES('".$Name."','".$Email."','".$Comment."')";
$_result=mysql_query($query);
if($result = mysql_query($query ,$db))
{
} else {
echo "error: ".mysql_error();
// DISPLAY FORM IF FORM HAS NOT BEEN SUBMITTED
}
}
if(isset($_POST['save'])){
}
//Select data from the database.
$result = mysql_query("SELECT Name,Email FROM Client ");
echo "<table border='1'>
<tr>
<th>Name</th>
<th>Email</th>
<th>Action</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['Name'] . "</td>";
echo "<td>" . $row['Email'] . "</td>";
echo "<td><a href='Edit.php'> Edit</a> <a href='Delete.php'> Delete</a></td>";
echo "</tr>";
}
echo "</table>";
mysql_close($db);
?>