0

i have create .inc file You can check my coding of .inc file.

if(!empty($_GET["name"])) {
$servername = "localhost";
$username = "allstatus";
$password = "sU*lTNVO,W%?";
$dbname = "allstatus";

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);

 $name = $_GET["name"];
 $sql = "SELECT * FROM hl_listings Where name ='$name'";
 $result = $conn->query($sql);

 if ($result->num_rows > 0) {
 // output data of each row
 while($row = $result->fetch_assoc()) {
    $id = $row["id"];
    echo $id;
    header ('Location : admin.php?a=edit_listing&lid='.$id.'&gid=0&p=');
    exit ();
}
} else {
echo "0 results";
}
$conn->close();

id is showing which i got from my database but not doing work of header location

Please tell me anyone what is wrong ? Waiting for good response .

0 Answers0