37 users online (1 members and 36 guests)  


  Results 1 to 9 of 9

Related

  1. return form info as webpage    Forum: PHP Forum
    Replies: 0
  2. trap carriage return - perl/windows    Forum: CGI Perl Forum
    Replies: 1
  3. Substitute For Request.form In Perl    Forum: CGI Perl Forum
    Replies: 1
  1. #1
    J-Man's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Nov 2003
    Posts
    32

    Return Form Answers - Perl

    What I want to do is this (in Perl):

    1) Have the user fill out an HTML Form
    2) After the user clicks on SUBMIT...
    ...Capture the form information, and...
    ...return the user to an HTML page that has all the information they entered filled into a printable HTML page.

    In other words, I think I want to "generate" an HTML page with all their information they entered on the form put on this page.

    I have everything working except the HTML page "generation". Any ideas on where to begin with doing this?

    Thanks in advance!!!

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Hi,

    I am by no means an expert on Perl, in any way, shape or form.
    However, I googled 'echo form input with perl' and found the following site which may be useful -
    http://www.utexas.edu/learn/cgi/index.html

    Hope it helps.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    J-Man's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Nov 2003
    Posts
    32
    Is there a way to fill in an already existing HTML page? What I mean is that I have an HTML page that has a table on it. I want to fill in certain cells in that table from a perl script. Is that possible? Thanks again!!!!!

  4. #4
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    The example above has Perl variable being echo'd with HTML. It doesnt matter what the HTML is, the above example should work?
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  5. #5
    J-Man's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Nov 2003
    Posts
    32
    Quote Originally Posted by QuietDean
    The example above has Perl variable being echo'd with HTML. It doesnt matter what the HTML is, the above example should work?
    I don't want to output ANY HTML at all!!! I want to send my Perl variables to an existing HTML file...filling in the cells in an already existing table.

  6. #6
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Oh, i see. It wasn't very clear.
    HTML on its own cannot do anything like this. Its like asking a newspaper to play a radio station.

    You could use a html file as a template, then let Perl read in the template, replace the values, and output the result.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  7. #7
    Enigma's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Nov 2000
    Posts
    426
    That's exactly what I've done in the past. I set up a HTML template with placeholders where I wanted to insert data. The Perl program read the HTML file and when it came to a placeholder, it inserted the proper value. Placeholders can look something like ****NAME_GOES_HERE***.

  8. #8
    J-Man's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Nov 2003
    Posts
    32
    Quote Originally Posted by Enigma
    That's exactly what I've done in the past. I set up a HTML template with placeholders where I wanted to insert data. The Perl program read the HTML file and when it came to a placeholder, it inserted the proper value. Placeholders can look something like ****NAME_GOES_HERE***.
    That's EXACTLY what I'm looking for!!! So, basically I need to loop through the HTML file, look for my placeholders, then replace with the appropriate data? The template is just a regular HTML file...correct?

  9. #9
    Enigma's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Nov 2000
    Posts
    426
    That's it exactly. I may have source around if you need a start. Can't promise though.



Tags for this Thread