html - How to represent a link dynamically in php? -


<?php $stmt = $con->prepare("select * user_tbl 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();  ?> 

this code runs fine 2 problems.. else part 0 records found shows want print after search placed , link .. can't click on it.. how can print link here ? added screenshot


Comments

Popular posts from this blog

How to check data type in C++? -

javascript - Is getTimezoneOffset() stable during daylight saving transition? -

sql server - SQL Query returns one result, does not return 0 or NULL result -