<?php
$stmt = $con->prepare("SELECT * FROM user_tbl WHERE name = ?");
$stmt->bind_param('s', $_REQUEST['name']);
$stmt->execute();
$result = $stmt->get_result();
if ($result->num_rows > 0)
{
while($row = $result->fetch_assoc())
{
echo '<br /><br />Name: ' .$row['name'];
echo '<br /><br />Contact Number: ' .$row['cont'];
echo '<br /><br />Email ID: ' .$row['email'];
echo "<br /><br /><a href='viewdtl.php' target='_blank'>View details</a>";
echo "<br /><hr />";
}
}
else
{
echo "0 records found";
}
$stmt->close();
?>
这段代码运行得很好但有两个问题..其他部分0 records found
总是显示我想在搜索到位后打印的内容和链接..我无法点击它..我怎么能在这里打印链接?