All..
When writing forms within a CGI, can you display the data in
a new clean HTML page, not one after the other
on the page
. Example below.

Program Code
#!/usr/bin/perl use CGI; print $q->header(); printf $q->startform; printf "<h1>CVS User Management</h1><br>"; printf "<P>"; printf "<b>Please select which cvs repository your would like to admin +ister.</b><br><br>"; foreach my $rep (<@reps>) { printf $q->radio_group (-name => 'cvsrep',<nt> -values => [$rep], -linebreak => 't +rue'); } printf "<br>"; printf "<b>Please select the function to use. <br></b><br>"; my @functions = <br>('Register_User','Delete_User','Show_All_U +sers','Reset_Password'); foreach my $func (<@functions>) { printf $q->checkbox_group (-name => 'function',<br> -values => [$func], -linebreak <br>=> 'tr +ue', -defaults => 'other'); } printf "<br>"; printf $q->reset; printf $q->submit ('Submit', 'Submit'); printf $q->endform; %formvals = $q->Vars(); my $repaccess = $formvals{cvsrep}; my $repfunction = $formvals{function}; if($repfunction =~ /Register_User/) {<br> printf $logo; &displayreg($repaccess); } elsif ($repfunction =~ /Delete_User/) { printf $logo; &displaydel($repaccess); } elsif ($repfunction =~ /Show_All_Users/) { printf $logo; &showallusers($repaccess); } elsif ($repfunction =~ /Reset_Password/) { printf $logo; &displayreset($repaccess); } sub displayreg() { printf $q->h1("CVS New User registation for $_[0]"); +# Print Header printf $q->start_form; printf "<br>"; printf "<b>Please enter the details below to register +a new user </b>";print"<br><br>"; printf "<EM>Users Username from GD </EM>"; print $q-> +textfield(-name=>'username',-size=>'20');print"<br><br>"; printf "<EM>Users Email Address </EM>"; print $q->tex +tfield(-name=>'emailaddr',-size=>'30');print"<br><br>"; printf $q->hidden(-name =>'mode',-value=>'regthisuser' +); printf $q->hidden(-name =>'repaccess',-value=>$_[0]); printf $q->submit(-value=>'Submit'); printf " "; printf $q->reset; printf $q->endform; printf "<BR>"; }
Example Page display, would look like
---------------------------------------------
| FORM |
| |
| Selection option: Radio Button |
| Selection option: Check_Box |
| |
| Submit | Reset |
---------------------------------------------|
When a users enter the data and submits the form

----------------------------------------------|
| FORM |
| |
| Selection option: Radio Button |
| Selection option: Check_Box |
| |
| Submit | Reset |
| |
| |
| Enter username: textbox |
| Enter users email address: textbox |
|--------------------------------------------|


So my problem in a bad way of explaining it is, How do
you put it in so that when the users clicks submit on the
first form he/she does not get the data, printed under
the form they submitted from, but rather a fresh
html page....

Edit castaway - added readmore tags


In reply to CGI form on click new window display by minixman

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.