i would like to know if it was possible that you could populate a drop down box from data already in your database using oracle and php
Parse error: parse error, expecting `','' or `';'' in C:\Apache\Apache2\htdocs\project\test2.php on line 13
I tried using this method but i get this error beacuse i am not uisng mysql, i am using oracle so i changed it to try work with oracle 10g, the codes below:
<?
if ($conn = oci_connect('hr', 'hr')) {
print 'Successfully connected to Oracle Database!';
oci_close($conn);
}
else {
$errmsg = oci_error();
print 'Oracle connect error: ' . $errmsg['message'];
}
$city=oci_query("SELECT * FROM country");
echo "<select name='city'><option value="0"> </option>";
while($row=oci_fetch_assoc($States)){
extract($row);
echo "<option value="$city">$city</option>";
}
echo "</select>";
?>
Parse error: parse error, expecting `','' or `';'' in C:\Apache\Apache2\htdocs\project\test2.php on line 13
I tried using this method but i get this error beacuse i am not uisng mysql, i am using oracle so i changed it to try work with oracle 10g, the codes below:
<?
if ($conn = oci_connect('hr', 'hr')) {
print 'Successfully connected to Oracle Database!';
oci_close($conn);
}
else {
$errmsg = oci_error();
print 'Oracle connect error: ' . $errmsg['message'];
}
$city=oci_query("SELECT * FROM country");
echo "<select name='city'><option value="0"> </option>";
while($row=oci_fetch_assoc($States)){
extract($row);
echo "<option value="$city">$city</option>";
}
echo "</select>";
?>