I am creating PHP products view details page this script disaply like this URL http://localhost/zblog/source.php?srcid=1 I want to get title URL from id like this http://localhost/zblog/source.php?title=some-title
Here is my code
<?php
include("config.php");
if(isset($_GET['srcid'])) {
$srcid = $_GET['title'];
if($stmt = $con->prepare("SELECT * from products WHERE srcid=?")){
$stmt->bind_param("s", $srcid);
$stmt->execute();
}
$result = $con->query($sql);
if($result->num_rows > 0){
while($row = $result->fetch_assoc()){
}
}
}
?>