in reply to Re^2: cgi error output
in thread cgi error output

my $error = $usr ? '' : 'Gah! No usr supplied!'; print <<HTML; <html> <head> <body> <p><strong>Username <input type="text" name="textfield" /> </strong></p> <p> Password <input type="text" name="textfield2" /> </p> <p> <input type="submit" name="Submit" value="Submit" /> <div class="error">$error</div> </p> </body> </html> HTML

... for example, but yes templates would probably be much better.

Replies are listed 'Best First'.
Re^4: cgi error output
by bigup401 (Pilgrim) on Apr 15, 2015 at 17:39 UTC

    i agree with ur simple, and i tried it already it works. bt the problem if ur doing it on login or sigin up page when u have set the cookie it prints the header at the top of the page

    second: when u exit with zero to terminate the process when its false, it works bt takes u to other blank page with the reponse, when there is no exit it works well bt it continue processing even if the process is false