I am having the form. when the options are selected in the form and search button is clicked it searches in the database according to the given values.Here i am getting the result limited values of a user. But if anyone want to see more details of that particular user i am adding click here link to get more details of that particular user from the database. How can i achieve this any suggestion.
<?php
include('config.php');
include('header.php');
if(isset($_POST['search'])){
$category = $_POST['category'];
$State = $_POST['State'];
$city = $_POST['city'];
$sql = "SELECT user,category,State,city FROM userdetails Where userdetails.category = '$category' OR userdetails.State = '$State' AND userdetails.city = '$city'";
$records = mysql_query($sql);
}
?>
<html>
<body>
<table width= "800" border="2" cellpadding="1" cellspacing="1">
<legend>Search Screen</legend>
while ($userdetails=mysql_fetch_assoc($records)) {
echo "<div class='controls'><tr>";
echo "<p><label class='control-label' for='searchall'>Name: </label>".$userdetails['user']."</p>";
echo "<p><label class='control-label' for='searchall'>Category:</label>".$userdetails['category']."</p>";
echo "<p><label class='control-label' for='searchall'>State:</label>".$userdetails['State']."</p>";
echo "<p><label class='control-label' for='searchall'>City:</label>".$userdetails['city']."</p>";
echo "<P><a href='userfullinfo.php'>More Info</a></p>";
echo "</tr></div>-------------------------------------------";
}
?>
</table>
</body>
</html>
How can i get the more column values of that particular user when clicking more info.
Thanks in advance