note 107131 rejected from function.msql-select-db by danbrown
| From: | danbrown@php.net | Date: | Tue, 10 Jan 2012 01:25:45 +0000 |
| Subject: | note 107131 rejected from function.msql-select-db by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-185511@lists.php.net to get a copy of this message | ||
Note Submitter: wemepes at web dot de
----
Hi,
I need help! I want to make a dropdownmenu but it doesn't work. The contracts will be displayed
in the menu. You can also select these. The result should be the display of the selected contract
.............................................................................
<?php
require_once('bookmark_fns.php');
session_start;
$conn = db_connect();
// Benutzername auf Eindeutigkeit prüfen
$result = $conn->query("select * from bookmark where gcname =
'".$_SESSION['valid_user']."'");
//$result = $conn->query($query);
$num_results = $result->num_rows;
echo '<h1>Gc60 Suchergebnisse</h1>';
echo '<font color="#ffffff">Anzahl gefundener Verträge: ' .
$num_results . '</font>';
echo '<br><table><tr><td>';
do_html_button_1();
echo '</td><td>';
do_html_button_4();
echo '</td></tr></table>';
echo '<b>Verträge suchen und anzeigen</b><br><br>';
echo '<select size=\"20\">';
echo '<option selected></option>';
//echo '<option>';
for ($i = 0; $i < $num_results; $i++)
{
$row = $result->fetch_assoc();
//echo '<font color="#ffffff">';
echo '<option>';
echo '<a href="'; echo $row['vertrag']; echo '.php';
echo '">';
echo $row['vertrag'];
echo '</a>';
echo '</option>';
}
//echo '</option>';
echo '</select>';
$result->free();
$db->close();
mfg Werner PETERS