1
personal speech, is the following I have a search script with php, I would like when it displays the result the properties of the searched word are changed(background, size, etc), for example I search the user name 'Joao' the system returns me a table with the relative results only that instead of showing me the normal result the system would change the background of the word that was searched, well the problem is the following I do not know if I can, or I should only do this with php, or I should use javascript, remembering that I am not asking for any code and yes the "best way"
follows the code of how the results of the query are displayed
while ($linha = $query->fetch(PDO::FETCH_ASSOC)) {
echo '<tr class="odd gradeX">';
echo '<td>' . $linha['NOME'] . '</td>';
echo '<td>' . $linha['EMAIL'] . '</td>';
echo '<td>' . $linha['LOGIN'] . '</td>';
echo '<td>' . $linha['DT_NASCIMENTO'] . '</td>';
echo '<td>' . $linha['DT_ULTIMOACESSO'] . '</td>';
echo '<td>' . $linha['IP'] . '</td>';
echo '</td>';
}
the above code generates the results of this table
Honestly, I couldn’t understand what you mean by
background
? You want to highlight the words?– Guilherme Nascimento
I really think I expressed myself badly, and basically this as it happens in duckduckgo.com when you research something it leaves on bold the term
– wwwjsw
Which variable is received by the PDO "querie"? Provide more complete code, there is no way to know what needs to be modified. Read this please: http://answall.com/help/mcve
– Guilherme Nascimento
William an image does not help, because the problem is not understanding what do you want, but rather try understand what you’ve already done, because you just put a piece of code. See if my answer helps you
– Guilherme Nascimento
Good afternoon, did my answer help you? Please let me know if you still have any questions. if not and the answer was helpful, please mark as "correct". Grateful.
– Guilherme Nascimento
opa @Guilhermenascimento sorry for the delay in marking as correct had forgotten, thanks for the help Chara
– wwwjsw
Glad I could help, wish you and your Chara projects success. + 1 for you
– Guilherme Nascimento