|
Posted by Colin Fine on 10/06/06 16:19
sk wrote:
>
>
> Geoff Berrow wrote:
>
>> Message-ID: <fqOUg.189189$QM6.88255@bgtnsc05-news.ops.worldnet.att.net>
>> from sk contained the following:
>>
>>
>>> 1. enter data using forms
>>> 2. do lookup using form that will display council persons or
>>> committees.. user will be able to select one and the system will
>>> display either the council people on committee or the committees that
>>> the council person is on.
>>
>>
>> You'd need three tables for this, council members, committees and a link
>> table.
> Have these three tables.
>>
>>> There will be more but right now I am working on the lookup portion.
>>> Would I use php to do sql select from either database and then
>>> 'somehow' put that into an html/xhtml select function? If that is the
>>> direction how do I take that select function to get one entry back to
>>> the database? etc? etc?
>>
>>
>> I don't get the impression that your knowledge of php and mysql is that
>> great. It's all fairly straightforward but not exactly a beginner's
>> project.
>>
> I am fine on mysql/sql but you are correct, I am learning PHP, hence the
> question.
>
A CGI program, whether in PHP, Perl or anything else, takes some
arguments and generates text - only the text happens to be HTML that is
then passed on by the server to the browser.
So to generate an HTML select, you need to make your PHP program write
out the literal text
<SELECT name = .. >
<OPTION .. >..</OPTION>
...
</SELECT>
etc.
Usually the OPTION lines will be generated by looping through some data,
often from a database query.
One difference between PHP and many CGI languages is that you don't have
to generate the whole of the HTML by program, but rather you can embed
bits of PHP program into your HTML.
Colin
[Back to original message]
|