Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing oracle fields in SQL using option value after Submit

Status
Not open for further replies.

rk68

Programmer
Jul 15, 2003
171
IN
Hi,
I have an oracle table which has about 10 fields. I am displaying all the fields as "option" in html.
The value is the field name from the oracle table.
The user will select the fields from the left box & move to box on the right.
The user clicks on submit button & the fields selected will be passed in an oracle query to display the values.
Note, I have to pass the oracle fields in the SQL.
How can this be done.
Please find attached incomplete PHP code below along with the screen shot (FieldPass.doc).
The doc file show the list of fields on the left & when some fields are selected and click on "Add" button to move the fields to the right box. After clicking on Submit button, the values will be passed in the Select query to the data from oracle table.


TIA
Raj


 
 http://files.engineering.com/getfile.aspx?folder=9978670a-7432-43eb-aeab-f3cc67ce69c0&file=FieldPass.doc
No PHP code can be seen.

With that said, your form should be passing the values to PHP in the $_POST or $_GET variables depending on your form's method. Since you are using a list, you can give the list a name with "[]" brackets, and PHP will turn that variable into an array, so you can see all the selected values.

Code:
<select name="oraclefields[b][][/b]">
...
</select>

Then you can just address them in PHP as $_POST['oraclefields'], and it will be an array you can manipulate normally.

----------------------------------
Phil AKA Vacunita
----------------------------------
OS-ception: Running Linux on a Virtual Machine in Windows which itself is running in a Virtual Machine on Mac OSx.

Web & Tech
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top