i'm faced with a situation where i want to click on a link and get data based on the $id. I'm able to do this but my problem is that i want the results to show on the same page not redirect to another page
$con = dbConnect();
$sql = $con->prepare("SELECT manuscript_id,authors,month,year,title,journal,pubmed_link FROM manuscript WHERE title like '%$term%'");
$sql->execute();
$sql->setFetchMode(PDO::FETCH_ASSOC);
//
if ($sql->fetch() == 0){
echo ('<h2>SORRY! No results found</h2>');
}
else {
$x=1;
while ($row = $sql->fetch()){//three
$manuscript_id = $row ['manuscript_id'];
$author = $row ['authors'];
$month = $row ['month'];
$year = $row ['year'];
$title = $row['title'];
$journal = $row ['journal'];
$pubmed_link = $row ['pubmed_link'];
echo $x++;
echo "<input type = 'checkbox' id='list' value='list'>";
echo ('<a href="abstract.php?manuscript_id=' . $manuscript_id . '">' . $title . '</a>') . "</br>" . "
" . $author . "</br>" . "
" . "<u>" . $journal . "</u>" . " " . $month . "
" . " " . $year . "
" . "</br>" . "</br>";
}
Is there a way i can avoid redirecting to "abstract.php"?
</div>