http://qs321.pair.com?node_id=178681

peacemaker1820 has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks!
I have an HTML page with different form fields. Upon some clicking in the form, I am opening up SQL database through PERL.

How can I take those values, which are in the database, and populate them back into some fields(input box, selection box, etc) in the same form? Basically I need it to work as a JavaScript. Is there a way to perform such an action or similar to that?

MANY THANKS

edited: Tue Jul 2 14:32:52 2002 by jeffa - title change

  • Comment on Populating HTML form fields from database (was: PERL and HTML)

Replies are listed 'Best First'.
Re: PERL and HTML
by ehdonhon (Curate) on Jul 01, 2002 at 22:10 UTC
Re: PERL and HTML
by Cyrnus (Monk) on Jul 01, 2002 at 21:26 UTC
    When using CGI.pm you can do this with the param function like so:

    param("paramater","new","values","here");


    John
Etiquette, maybe OT (was: Re: PERL and HTML)
by bronto (Priest) on Jul 02, 2002 at 07:55 UTC

    I will not reply to your technical question.

    Instead, I'll run the risk of being offtopic and tell you that if you want to gain our attention you shouldn't rely on weird formatting of the text or writing LARGE portions in BOLD and ALL CAPS.

    If you want to get some attention, please do it following just a few simple rules:

    • use a descriptive subject
    • include snippets of code where appropriate
    • use italics, bolds and other visual formatting only when it helps others to better understand what you are asking

    MANY THANKS, brother peacemaker1820

    --bronto

    # Another Perl edition of a song:
    # The End, by The Beatles
    END {
      $you->take($love) eq $you->made($love) ;
    }