//I used the following command to hyperlink:

$result_id1 = mysql_query("SELECT * FROM query order by case_id");
for ($i=0; $row1=mysql_fetch_array($result_id1); $i++)
{
//case_no is a field in the table "query"
echo "<TD><b><a href='http://localhost/test/details.php?case=$row1[case_no]'> $row1[case_no]</a></b> </TD>";
}

//now the file details.php is something like:

$case= $_REQUEST;
// after the connection and all
$result_new = mysql_query("SELECT * FROM query WHERE case_no = '$case'") or die ("Error: ".mysql_error());
$row=mysql_fetch_array($result_new);

//After i do this, I am getting a blank when i try to display a field of the table "date_rec"

echo $row[date_rec];

please help me out asap...
see "case_id","case_no" and "date_rec" are the fields in the table "query"

try to print the query string $_REQUEST['case']; and print this query and execute that query in phpmyadmin: echo "SELECT * FROM query WHERE case_no = '$case'"; and also try to change the code like:

$result_id1 = mysql_query("SELECT * FROM query order by case_id");
while($row1=mysql_fetch_array($result_id1))
{
$cno=$row1[case_no];
//case_no is a field in the table "query"
echo "<TD><b><a href='http://localhost/test/details.php?case=$cno'> $cno</a></b> </TD>";
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.