<?php
$con = new mysqli('localhost','root','','practice');
if($con->connect_error)
{
echo "".connect_error;
}
$quer = "select * from form";
$result= $con->query($quer);
echo "<h1>Edit/Remove</h1>";
echo "<table border=1><tr><th>Firstname</th><th>Lastname</th><th>Email</th><th>Password</th><th>Month</th><th>Day</th><th>Year</th>
<th>Gender</th><th>Telugu</th><th>Hindi</th><th>English</th>
<th>Mobile</th><th>Location</th><th>Edit</th><th>Delete</th></tr>";
if($result->num_rows >0)
{
while($row = $result->fetch_assoc())
{
echo "<tr>";
echo "<td>".$row['Firstname']."</td>"."<td>".$row['Lastname']."</td>"."<td>".$row['Email']."</td>"."<td>".$row['Password']."</td>"."<td>".$row['Month']."</td>"."<td>".$row['Day']."</td>"."<td>".$row['Year'].
"</td>"."<td>".$row['Gender']."</td>"."<td>".$row['Telugu']."</td>"."<td>".$row['Hindi']."</td>"."<td>".$row['English']."</td>"."<td>".$row['Mobile']."</td>"."<td>".$row['Location']."</td>";
echo "<td><form method='post' action='update.php' ><input type='hidden' name= 'email' value='".$row['Email']."'><input type='submit' value='edit'>
</form></td>"."<td><form method='post' action='delete.php' ><input type='hidden' name= 'email' value='".$row['Email']."'><input type='submit' value='delete'>
</form></td>";
echo "</tr>";
}
}
echo "</table>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<a href='form.html'>Home</a>";
$con->close();
?>
我想用代码替换代码中的表单标签并使用onclick执行操作 - 我可以在没有jQuery或json的情况下执行此操作吗?