Hi All,
Find the code below.
<html>
<body>
<?php
include('connect.php');
?>
<form method=post>
<pre>
Name <input type=text name=name>
<input type=submit value='Search' >
</form>
</pre>
<table border=1 align=center>
<tr><th>Id</th><th>Name</th><th>Marks</th><th>Rank</th></tr>"
<?php
if(isset($_POST['name']))
{
$name=$_POST['name'];
$sql="select * from tbl_student where st_name like '%$name%'";
$data=mysql_query($sql,$con) ;
while($row=mysql_fetch_row($data))
{
echo "<tr><td>$row[0]</td><td>$row[1]</td><td>$row[2]</td><td>$row[3]
</td><td><a href=delstudent.php?id=$row[0]&name=$row[1]&marks=$row[2]
>Delete<a></td></tr>";
}
}
?>
</table>
</body>
</html>
Find the code below.
<html>
<body>
<?php
include('connect.php');
?>
<form method=post>
<pre>
Name <input type=text name=name>
<input type=submit value='Search' >
</form>
</pre>
<table border=1 align=center>
<tr><th>Id</th><th>Name</th><th>Marks</th><th>Rank</th></tr>"
<?php
if(isset($_POST['name']))
{
$name=$_POST['name'];
$sql="select * from tbl_student where st_name like '%$name%'";
$data=mysql_query($sql,$con) ;
while($row=mysql_fetch_row($data))
{
echo "<tr><td>$row[0]</td><td>$row[1]</td><td>$row[2]</td><td>$row[3]
</td><td><a href=delstudent.php?id=$row[0]&name=$row[1]&marks=$row[2]
>Delete<a></td></tr>";
}
}
?>
</table>
</body>
</html>
This comment has been removed by the author.
ReplyDeleteexcellent........
ReplyDeleteI can't believe my eyes.......