Calling Tags From my blog post to header keywords for SEO purpose. Is this Safe Code?
<meta name="keywords" content="<?php
$title_slug = substr($_SERVER['REQUEST_URI'], strpos( $_SERVER['REQUEST_URI'],'/video') + 7);
$title_slug = rtrim( $title_slug,"/" );
$sqls = "SELECT * FROM posts where title_slug='" . sanitizeInput($title_slug) . "' ORDER BY id DESC";
$result = mysqli_query($conn, $sqls);
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
$actortags = $row['actor_tags'];
echo $actortags;
}
}
?>">
thaanks!
|