1
Folks I am developing an application, and I would like when a search for the search form is conducted to return a value as a link to a given page associated with the searched name, someone knows how to tell me how to do this?
Here is the part of the code that brings the results:
$sql = "SELECT * FROM empresa WHERE nome LIKE '%$busca%' AND cidade = '$cidade'";
$resultados = $conexao->query($sql);
if ($resultados->num_rows > 0) {
    while($linha = mysqli_fetch_array($resultados)) {
        echo utf8_encode("<strong>Nome: </strong>" . $linha['nome'] . "</br>");
        print ("<strong>Endereço: </strong>" . $linha['endereco']."</br>");
        if( isset($_POST['cidade']) && $_POST['cidade'] === 'sao-gabriel-da-palha' ) {
            $fromPerson = 'São Gabriel da Palha';
            echo "<strong>Cidade: </strong>".$fromPerson."</br>";
        }
        print ("<strong>Telefone: </strong>" . $linha['telefone']."</br>");
        echo "<strong>email: </strong>". $linha['email']."</br>";
        echo "<hr>";
    }
} else {
    echo "Nenhum resultado para a sua busca.";
}
Edit the question and place the part of the code that is returning the result.
– NoobSaibot
in the company table you have a column with the website address ?
– NoobSaibot