Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: Script not returning header

by screamingeagle (Curate)
on Mar 09, 2002 at 04:02 UTC ( #150496=note: print w/replies, xml ) Need Help??

in reply to Script not returning header

maybe you should specify the content-type first ?
you are also using a semi-colon instead of a comma at the end of print header here's a sample code (stolen from the documentation :-) )
print header, start_html('A Simple Example'), h1('A Simple Example'), start_form, "What's your name? ",textfield('name'),p, "What's the combination?", p, checkbox_group(-name=>'words', -values=>['eenie','meenie','minie','moe'], -defaults=>['eenie','minie']), p, "What's your favorite color? ", popup_menu(-name=>'color', -values=>['red','green','blue','chartreuse']),p, submit, end_form, hr; if (param()) { print "Your name is",em(param('name')),p, "The keywords are: ",em(join(", ",param('words'))),p, "Your favorite color is ",em(param('color')), hr; }

Replies are listed 'Best First'.
Re: Re: Script not returning header
by Chady (Priest) on Mar 09, 2002 at 08:48 UTC
    "you are also using a semi-colon instead of a comma at the end of print header "

    so?? do you think that's the problem?

    using semi-colon means that it's the end of the statement, while a comma means a list, what you are actually doing, is using a list with a single print statement.. and this is not the problem here.

    print header, start_html('A Simple Example');
    basically does the same thing as :
    print header; print start_html('A Simple Example');

    He who asks will be a fool for five minutes, but he who doesn't ask will remain a fool for life.

    Chady |

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://150496]
[choroba]: exceptions to this rule are rare

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2018-03-20 10:47 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (250 votes). Check out past polls.