If I understand correctly, you want to send the parameters both to your script (so you can print them) and to a second script (submitq). That's quite tricky because HTTP & HTML designers failed to forsee the need to do a POST redirection. If you only needed to send it to submitq, then you could:

<form ...> <center><input type=submit value=Send name=S1></center> </form>

to:

<form method="POST" action="http://.../submitq.cgi"> <center><input type=submit value=Send name=S1></center> </form>

One way would be to get JavaScript to do a post by changing:

# When it is print # Redirect to another web page if (param('S1') eq "Send") { print BOBIN $datajoin; print redirect("http://.../submitq.cgi"); }

to:

if (param('S1') eq "Send") { print BOBIN $datajoin; <body onload="form1.submit()"> <form name="form1" method="POST" action="http://.../submitq.cg +i"> foreach ($cgi->params()) { <input type=hidden name="$_" value="$cgi->param($_);" > } </form> }

Another alternative is a "subquery". Change:

# When it is print # Redirect to another web page if (param('S1') eq "Send") { print BOBIN $datajoin; print redirect("http://.../submitq.cgi"); }

to:

if (param('S1') eq "Send") { print BOBIN $datajoin; require LWP::UserAgent; require HTTP::Request::Common; $ua = ...; $ua->request(POST 'http://.../submitq.cgi', [ params ]); print the response. }

As an aside, open(FH, ">>...") will create the file if necessary, so

if (-e $datefile) { open (BOBIN, ">>$datefile") || die "Cannot Open File $datefile for + writing: $!"; # Open Data file } else { ### Else open directory where files data files are located # Sort in descending order, pick out first file # And e-mail it # Then create a new file with current data as name open (BOBIN, ">$datefile") || die "Cannot create File $datefile f +or writing: $!"; }

simplifies to

open (BOBIN, ">>$datefile") || die "Cannot Open File $datefile for + writing: $!"; # Open/Create Data file

In reply to Re: Updated Button Question by ikegami
in thread Updated Button Question by Midnite

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.