- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
<?php
require_once "class/db.php";
require_once "secrets.php";
ini_set("error_reporting","E_ALL");
$db_obj= new db($mysql_host,$mysql_user,$mysql_pass,$mysql_db);
while ($row=$object->sql_fetch_assoc("SELECT id, name FROM categories ORDER BY sort ASC"))
{
$cats[] = $row;
}
$cats_list = "";
while ($cats){
{
$cats_list .= "<options value=\"" . $cats['id'] . "\">" . $cats['name'] . "</options>";
}
$form = <<<FORM
<form action='" . $PHP_SELF . "' method='post' enctype='multipart/form-data'>
<b>Поиск</b><br>
<tr>
<td>
<b>Cтрока поиска:</b><input type=\"text\" size=\"40\" name=\"string\">
</td>
<td>
<b>Выберете категорию</b>
<select name=\"cats\">
$cats_list
</select>
</td>
</tr>
</form>
FORM;
print ($form);
?>
guest 25.04.2017 16:45 # 0