PHP Example
Screen shot
Screen shot
PHP Script to maintain details view (save file as index.php)

<?php
$conn=mysql_connect('localhost','root','') or die('Not connected');

$database=mysql_select_db('student',$conn) or die('Database Not connected');

$query="SELECT * FROM info";
$data=mysql_query($query);
echo "<table border='1'>";
echo "<tr>";
echo "<th>Fname</th>";
echo "<th>Lname</th>";
echo "<th>Details</th>";
echo "</tr>";
while($result=mysql_fetch_array($data))
{
echo "<tr>";
echo "<td>$result[1]</td>";
echo "<td>$result[2]</td>";
echo "<td><a href='details.php?id=$result[0]'>Details</a></td>";
echo "</tr>";
}
echo "</table>";
?>

details.php

<?php
$conn=mysql_connect('localhost','root','') or die('Not connected');

$database=mysql_select_db('student',$conn) or die('Database Not connected');

$id=$_REQUEST['id'];

$query="SELECT * FROM info where id=$id";
$data=mysql_query($query);
$result=mysql_fetch_array($data);
echo "<table border='1'>";
echo "<tr>";
echo "<td>First Name</td>";
echo "<td>$result[1]</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Last Name</td>";
echo "<td>$result[2]</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Email</td>";
echo "<td>$result[3]</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Country</td>";
echo "<td>$result[4]</td>";
echo "</tr>";
echo "</tr>";
?>

Database

--
-- Database: `student`
--

-- --------------------------------------------------------

--
-- Table structure for table `info`
--

CREATE TABLE IF NOT EXISTS `info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `fname` varchar(255) NOT NULL,
  `lname` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `country` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;

--
-- Dumping data for table `info`
--

INSERT INTO `info` (`id`, `fname`, `lname`, `email`, `country`) VALUES
(1, 'Ravi ', 'Srivastava', 'shishir012010@gmail.com', 'india'),
(2, 'Sanjay', 'Prashar', 'ravi08@yahoo.com', 'india'),
(3, 'Yogesh', 'Khanna', 'yogesh@yahoo.com', 'America'),
(4, 'Deepak', 'Kumar', 'deepak@gmail.com', 'India');

You can download source code here