$Data = $con->prepare("SELECT Example1,Example2,Example3,Example4 FROM SITES WHERE Email=:Email");
$Data->execute(array(
':Email' => $Email,
));
if ($Data->rowCount() > 0) {
$Rows = $Data->rowCount();
$CL = 1;
$Result = $Data->fetch(PDO::FETCH_ASSOC);
while ($CL <= $Rows) {
$Example1 = $Result['Example1'];
$Example2 = $Result['Example2'];
$Example3 = $Result['Example3'];
$Example4 = $Result['Example4'];
$CL = $CL++;
echo
'<tr class="tr">
<td class="td"><?=$Example1?></td>
<td class="td"><?=$Example2?></td>
<td class="td"><?=$Example3?></td>
<td class="td"><?=$Example4?></td>
<td class="td"></td>
</tr>';
}
}
我想要email=:email
php将打印现有表格的html行的每一行。谢谢你的建议,祝你有个美好的一天!
答案 0 :(得分:0)
$characters = $_GET["search"];
$characters2 = "%". $characters . "%" ;
$statement = $connection->prepare(
"SELECT name,username FROM users WHERE 'name' LIKE :username or 'username' LIKE :username");
$statement->bindParam(':username', $characters2, PDO::PARAM_STR);
$statement->execute();