Very hard to find - so please help !
DB driven menu
Moderator: General Moderators
DB driven menu
Could anybody help with code or link to a Oracle/PHP driven dropdown menu.
Very hard to find - so please help !

Very hard to find - so please help !
For dropdown menu you mean a form with a select tag?
Something like the one under the posts here?
"Display posts from previous:
All Posts |V|
1 Day
7 Days ...etc "
If you mean that maybe you can try this:
This is just a modification of a script I found on the php manual.
This script takes his input from another form... ($_POST).
I hope this helps.
Bye
Something like the one under the posts here?
"Display posts from previous:
All Posts |V|
1 Day
7 Days ...etc "
If you mean that maybe you can try this:
Code: Select all
<?php
$conn = OCILogon($_POSTї"user"],$_POSTї"passwd"],$_POSTї"conn_str"]);
$stmt = OCIParse($conn, "select * from cat");
OCIExecute($stmt);
$nrows = OCIFetchStatement($stmt,$results);
if ( $nrows > 0 ) {
print "<FORM action=proc.php method="post">\n";
print "<SELECT>\n";
while ( list( $key, $val ) = each( $results ) ) {
for ( $i = 0; $i < $nrows; $i++ ) {
reset($results);
while ( $column = each($results) ) {
$data = $columnї'value'];
print "<OPTION>$dataї$i]</OPTION>\n";
}
}
}
print "</SELECT>\n";
print "</FORM>\n";
}
else {
echo "<BR>This schema hasn't any cat object.\n";
}
OCIFreeStatement($stmt);
OCILogoff($conn);
?>This script takes his input from another form... ($_POST).
I hope this helps.
Bye