<?php
if(isset($_REQUEST['del_id']))
{
$del=$_REQUEST['del_id'];
$de="delete from user where uid='$del'";
$ex=mysql_query($del); header("location:view.php");
}
?>
< html>
< body>
<form method="post" name="form1" >
< table width="200" align="center" class="frm_tbl">
<tr>
<td>Uid</td>
<td>Name</td>
<td>Password</td>
<td>Gender</td>
<td>Hobby</td>
</tr>
<?php
while($r = mysql_fetch_array($ex))
{
?>
<tr>
<td><?php echo $r['uid']; ?></td>
<td><?php echo $r['name']; ?></td>
<td><?php echo $r['password']; ?></td>
<td><?php echo $r['Gender']; ?></td>
<td><?php echo $r['Hobby']; ?></td>
<td><a href="view.php?del_id=<?php echo $r['uid']; ?>">delete</td>
</tr>
<?php
}
?>
< /table>
</form>
if(isset($_REQUEST['del_id']))
{
$del=$_REQUEST['del_id'];
$de="delete from user where uid='$del'";
$ex=mysql_query($del); header("location:view.php");
}
?>
< html>
< body>
<form method="post" name="form1" >
< table width="200" align="center" class="frm_tbl">
<tr>
<td>Uid</td>
<td>Name</td>
<td>Password</td>
<td>Gender</td>
<td>Hobby</td>
</tr>
<?php
while($r = mysql_fetch_array($ex))
{
?>
<tr>
<td><?php echo $r['uid']; ?></td>
<td><?php echo $r['name']; ?></td>
<td><?php echo $r['password']; ?></td>
<td><?php echo $r['Gender']; ?></td>
<td><?php echo $r['Hobby']; ?></td>
<td><a href="view.php?del_id=<?php echo $r['uid']; ?>">delete</td>
</tr>
<?php
}
?>
< /table>
</form>
0 comments:
Post a Comment