0
Expensive;
I have this code:
<?php
$sql = "select * from tabela where codsegur = '7562315'";
$stm = $conexao->prepare($sql);
$stm->execute();
$count = $stm->rowCount();
if ($count > 0) {
while($row = $stm->fetch()) {
echo "<a href=caminho/".$row['caminho']."></a>";
}
}
?>
The variable $row
receives the SQL return above, and the array
path would be the path where the file would be. In this case, wanted to concatenate the href
along with the path and generate the file link on my download page. In short, when accessing the page and entering the code (7562315) in the form, present the file in question, whose file is with its path set in the array
(path). To not need to put the whole form, I have put the direct code in SQL to give the return I need.
When I do this process, nothing happens, and it does not generate errors. When I give a echo
in the $row['caminho']
, appears the path that is set in the database.
Can someone assist me in what/where I am missing?
Note: Connection to database is Ok.
Grateful.
The contents of the tag were not missing
<a>
? You just filled in thehref
.– Woss
Wow, what a bizarre lack of attention. Thank you.
– user54154