Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.
Moderator: General Moderators
-
Brakanjan
- Forum Newbie
- Posts: 19
- Joined: Wed May 14, 2003 9:57 am
- Location: South Africa
Post
by Brakanjan »
Hi
I'm (still) new to php and html and need to do the following:
I have a database and I get values by
while ($R = ibase_fetch_row($Q))
{
echo "$R[0]";
}
Now I want to insert those values in a combobox so the user can select them again. I've tried:
print "<Select>"
while ($R = ibase_fetch_row($Q))
{
print"<Option>";
}
print "</Select>"
As far as I can image 'Print' writes directly to html and you can insert html code directly from php. If 'print' doesn't do the job, what does?
tx
-
uncoDMX
- Forum Newbie
- Posts: 7
- Joined: Thu Jun 05, 2003 5:49 am
- Location: Romania
-
Contact:
Post
by uncoDMX »
you could do it this way :
echo '<select>';
while ($R = ibase_fetch_row($Q))
{
echo '<option>', $R[0], '</option>';
}
echo '</select>';
but there are manny things you have to do to make it work right.
read some documentation about forms
-
Brakanjan
- Forum Newbie
- Posts: 19
- Joined: Wed May 14, 2003 9:57 am
- Location: South Africa
Post
by Brakanjan »
tx for the reply
any recommendations? (about documentation of forms and php)