|
pls help me.i want to get input from user in one perl file and want to
get those inputs in another
perl file.here is my code and im not able to get those inputs.kindly
help me.where im wromg?
this is one.pl
#!/usr/bin/perl
use CGI qw/:standard/;
# Print the MIME header before doing anything else:
print "Content-type: text/html\n\n";
print '<html><body><form action=http://192.168.10.2/cgi-bin/perl/
two.pl method= post>';
# Prints example HTML form with signature in a <table>
print<<END_TEXT;
<table>
<tr>
<td><b>Address line 1:</b></td><td><input type="text"
name="address1"></td>
<tr>
<td><b>Address line 2:</b></td><td><input type="text"
name="address2"></td>
<tr>
<td><b>City:</b></td><td><input type="text" name="city"></td>
<tr>
<td><b>Prov:</b></td><td><input type="text" name="prov"></td>
<tr>
<td><b>Postal:</b></td><td><input type="text" name="postal"></td>
<tr><td colspan="2" align="center">
<input type="hidden" name="userid" value="$userid">
<input type="hidden" name="credit_ok" value="$credit_ok">
<input type="hidden" name="form_expires" value="$form_expires">
<input type="submit" name="chaddr" value="Change address" >
</td></tr>
</table>
</form>
END_TEXT
}
two.pl
#!/usr/bin/perl
print "Content-type:text/html\n\n";
print "<HTML><HEAD>";
print "<TITLE>CGI Test</TITLE>";
print "</HEAD>";
print "<BODY><H2>I just wrote a web page using Perl!$city $address1</
H2>";
#print param('city');
print $userid;
print "</BODY></HTML>";
|
|
|
|
|
|
|
// |