Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing variables from form to cgi

Status
Not open for further replies.

madaxe

Technical User
Dec 21, 2004
44
US
Why can i not pass the info from my html page to my cgi script? Im trying to learn perl and i want to break stuff down into easy steps for now...please help

MadAxe


################ HTML FILE ################

<html>
<body bgcolor=black text=yellow>

<form method="POST" action="test.cgi">

<div style='position: absolute; top: 170; left: 530;'><b>Name: </b><input type=text name=name size=30></div><br>
<div style='position: absolute; top: 200; left: 468;'><b>E-mail Address: </b><input type=text name=email size=30></div><br>
<div style='position: absolute; top: 270; left: 426;'><b>Fantasy Player Name: </b><input type=text name=player size=30></div><br>
<div style='position: absolute; top: 300; left: 507;'><b>Password: </b><input type=password name=pass><input type=submit value=Submit name=submit></div>

</form>


</body>
</html>


################ CGI FILE ################

#!/Perl/bin/perl
use CGI qw:)standard);
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);

$username = '$form{name}';
$password = '$form{pass}';
$emailadr = '$form{email}';
$player = '$form{player}';

print <<"html";

<body>
<div style="position: absolute; top: 0; left: 10;"><h4><u>$username</u></h4></div>
<div style="position: absolute; top: 0; left: 110;"><h4><u>$password</u></h4></div>
<div style="position: absolute; top: 0; left: 210;"><h4><u>$emailadr</u></h4></div>
<div style="position: absolute; top: 0; left: 320;"><h4><u>$player</u></h4></div>
</body>
html
 
IGNOR ALL I WAS BEING STUPID SUSSED IT

MadAxe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top