QUOTE(rpjd @ 9 Mar, 2007 - 04:54 PM)

I need to query a postgresql database using a value selected from an html select form.
I cannot find any site which discusses this
I am using the following code to capture the forms selected value
document.form.partname.option.selected
the select form name is partname.
Not sure if I am using the correct syntax.
RPJD

My apologies, what meant to say, should have said was I am (hopefully) connecting to a Postgresql database using php embedded in a html file, using a selected form value as the basis of a select statements so
</php $a = pg_connect("select x from tablename where y = 'document.form.formname.option.selected';")
I am then trying to assign the value $a to a text field within the same form.
although document.forms[0] does looks much tidier I must admit!
When I assign the value to a text field say
<input name="x" value="<? php echo$a; ?>">
the php code is visible in the text field
RPJD