CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
HELP STUMPED HTML SOURCE CODE

 



s4hire1
New User

Aug 23, 2012, 10:43 AM

Post #1 of 2 (1524 views)
HELP STUMPED HTML SOURCE CODE Can't Post

I worte a perl script that stores check box information from an html form in mysql. Here is my dilema ... After all my forms have been completed I try and assemple a final report with those items and only those items that were selected. So I am trying to re-open the HTML form file and reprint it to the screen and by using regular expressions I am searching for a particular name in the name field of the check box and trying to mark it checked and only show that.

I cannot figure out for the life of me how to read the source code or just the text from the file ... alter it and then reprint it on the screen so the user can see the HTML output. example:

<input name="G13" type="checkbox">SOME VALUE</input> //

if G13 was returned from the database i want to re generate the HTML with this

<input name="G13" type="checkbox" value="checked">SOME VALUE</input>


FishMonger
Veteran / Moderator

Aug 23, 2012, 12:16 PM

Post #2 of 2 (1522 views)
Re: [s4hire1] HELP STUMPED HTML SOURCE CODE [In reply to] Can't Post

Bad approach.

Use one of the template modules on cpan, such as HTML::Template.
http://search.cpan.org/~wonko/HTML-Template-2.91/lib/HTML/Template.pm

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives