in reply to CGI DBI refining results

Hi, I am not exactly sure what does "drop down menu which will allow the user to refine the results" mean, but, if you want to hack this form to allow editting employees, see html or xhtml specification, to catch graphical possibilities.
POST method is, imho, better, because it does not limit amount of submited bytes, and, conceptually, submited form data would not be part of url...
HTML 4.01 Specification
XHTML™ 1.0 The Extensible HyperText Markup Language (Second Edition)

Replies are listed 'Best First'.
Re^2: CGI DBI refining results
by Anonymous Monk on Nov 28, 2005 at 11:11 UTC
    for the above code example i have selected from the database employees. So with the drop down menu i want to select the employee i want more information about. When submitted instead of directing to a new script i want to print the information to the same page. Therefore, would i need to add to the url the name of the employye so GET/POST can act onit to print info to same screen?
      Consider using the hidden in the form. Then put all the information required in hidden elements (its not displayed in the page so only hide what you don't want seen/changed but want the script to receive). When its submitted you can read that. However, your sending the information in a select to your displayResults.pl file. Only the selected name will be sent, and only items within the specific form (you can have more then one form in an html page and each is individual), so if you want the entire select, you'll have to send each line as a hidden or group them all into one hidden and break them down in the script.
      No, you have not add anything into url explicitly, selected employeeID will be sent automatically to server when submit occurs.
      You can add some if-then-else into your script, to recognize, if posted value of employeeID (value of selected option) is empty or not empty. When empty, you can print current version, when nonempty, you can print detail informations about selected employee.
      Now I see simplicity of your question. If you require only this, you can use <form method="GET">, which is better for debugging...