Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Question about this simple CGI

by toolic (Chancellor)
on Jul 17, 2013 at 19:55 UTC ( #1044882=note: print w/ replies, xml ) Need Help??


in reply to Question about this simple CGI

#ffffff is not correct syntax. Maybe change:

$q->start_html( -title => "Add user", -bgcolor => #ffffff);

to:

$q->start_html( -title => "Add user", -bgcolor => 0xffffff);


Comment on Re: Question about this simple CGI
Select or Download Code
Re^2: Question about this simple CGI
by Chaotic Jarod (Novice) on Jul 17, 2013 at 20:00 UTC
    That fixed that, not it's telling me that $day and $number are both unitialized, any clue why?
      it's telling me that $day and $number are both unitialized, any clue why?

      They are not being sent from your html page probably. You can assign defaults like this;

      my $name = $q->param('name') || 'noname'; my $day = $q->param('day') || 'noday'; my $number = $q->param('number') || 'nonumber';

      The elements after the print line should be comma separated and you shouldn't be printing after the end_html

      print $q->header, $q->start_html( -title => "Add user", -bgcolor => "#ffffff"), $q->p("Data submitted"), $q->tt("$name<br/>$day<br/>$number"), $q->end_html;

      And you may wish to add this while developing to see any errors in the browser.

      use CGI::Carp 'fatalsToBrowser';
      poj

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2014-11-01 13:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    If a safe, affordable anti-ageing treatment that extended life indefinitely were to become available, would you take it?



    Results (4 votes), past polls