summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-04-17 10:15:38 +0200
committerErich Eckner <git@eckner.net>2018-04-17 10:15:38 +0200
commitd40e75df2535f60428701720270859a5b31b8acb (patch)
tree22d7fbee6224779617d6e4656dc9df058b97db43
parent7ce27678ecf5f4115e73d8290941c83f39520490 (diff)
downloadarchweb32-d40e75df2535f60428701720270859a5b31b8acb.tar.xz
packages/index.php: another small step towards lib/mysql.php
-rw-r--r--packages/index.php16
1 files changed, 5 insertions, 11 deletions
diff --git a/packages/index.php b/packages/index.php
index 79c47ea..e9a78c1 100644
--- a/packages/index.php
+++ b/packages/index.php
@@ -2,17 +2,16 @@
include "lib/mysql.php";
-?>
-<!DOCTYPE html>
-
-<?php
-
foreach (array("bugs","sort") as $expected_param)
if (! isset($_GET[$expected_param]))
$_GET[$expected_param] = "";
-?>
+ $result = mysql_run_query(
+ "SELECT `name` FROM `architectures` ORDER BY `name`"
+ );
+?>
+<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
@@ -52,11 +51,6 @@
Arch</label><select multiple="multiple" id="id_arch" name="arch">
<?php
-if (! $result = $mysql -> query(
- "SELECT `name` FROM `architectures` ORDER BY `name`"
- ))
- die ($mysql -> error);
-
while ($row = $result -> fetch_assoc()) {
$archs[$row["name"]] = $row["name"];
print "<option value=\"" . $row["name"] . "\"";