$stat = $con->prepare("SELECT * FROM view WHERE user_name =:user ORDER BY id DESC");
$stat->bindValue(':user', $user);
$stat->execute();
$row = $stat->fetch(PDO::FETCH_ASSOC)
$model=$row['model'];
This is script works without any problem.
Is $model
safe or do I need to sanitize it?
Usage:
<span><?php echo $row['model'] ;?></span>
Is this safe?