I'm trying to access a cgi script when a form is submitted. With that script, I want to display a page that basically says, "Is this info correct?" and show them what they entered. Then, if they hit "Yes", I want to send an email to myself with their info. If no, I want it to go back to the previous page. I'm not sure how to do this. I'm stuck after creating the confirmation page. Here's what I have so far:
#!/usr/bin/perl
#confirmSubscribe.cgi
print "Content-type: text/html\n\n";
use CGI qw(:standard);
use Mail::Sendmail;
use strict;
#var declarations
my ($firstName, $lastName, $email, $street, $city, $state, $zip, $msg, %mail);
#var values
$firstName = param('firstName');
$lastName = param('lastName');
$email = param('email');
$street = param('street');
$city = param('city');
$state = param('state');
$zip = param('zip');
#create page
sub send
print header;
print <<endHtml;
<html>
<head>
<title>Please confirm your information</title>
<body>
<p> </p>
<p> </p>
<p> </p>
<p align="center" /><h2>Please confirm your information:</h2></p>
<p><font size="4" face="Arial">$firstName $lastName<br />
$email<br />
$street<br />
$city, $state $zip</font></p><br /><br />
<form method="post" action="http://www.sgnscoops.com/Magazines/magazineMain.html">
<input type="submit" value="Yes, it's correct.">
</form><form method="link" action="http://www.sgnscoops.com/cgi-bin/subscriptionSent.cgi">
<input type="button" value="No, I made a mistake.">
</form>
</body>
</html>
endHtml