Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Re: Re: Re: Re: CGI PM

by eg (Friar)
on Jan 29, 2001 at 01:30 UTC ( [id://54888]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Re: CGI PM
in thread CGI PM

What do you mean by "something is still wrong"? Do you mean that it's not in the format you want? If you want to output HTML, replace the entire second part with something like

print header; if ( keys %data ) { # found, display data print ul( map { li("$_: $data{$_}") } keys %data); } else { # not found, show error print h1("Can't find row '$rowid'"); }

The functions header, ul, li and h1 are all in CGI.pm (and do just what they sound like.) Ideally you'd want to use something like Template Toolkit or Text::Template for you html, rather than embedding it in the perl.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://54888]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (6)
As of 2024-04-25 08:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found