Ideology: |
Description: |
Political index: |
Economical index: |
Social index: |
Cultural index: |
connect_error) {
die("Connection failed: " . htmlspecialchars($conn->connect_error));
}
// Prepare and execute query safely
$sql = "SELECT Name, Description, Polindex, Ecoindex, Socindex, Culindex FROM ideologies";
$result = $conn->query($sql);
if ($result && $result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
$name = htmlspecialchars($row["Name"]);
$description = htmlspecialchars($row["Description"]);
$pol = htmlspecialchars($row["Polindex"]);
$eco = htmlspecialchars($row["Ecoindex"]);
$soc = htmlspecialchars($row["Socindex"]);
$cul = htmlspecialchars($row["Culindex"]);
echo "
{$name} |
{$description} |
{$pol} |
{$eco} |
{$soc} |
{$cul} |
";
}
} else {
echo "No results found |
";
}
$conn->close();
?>