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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

receiving data from a form 1

Status
Not open for further replies.

Buddyholly83

IS-IT--Management
Aug 7, 2005
23
GB
I am playing about with forms and trying to receive some form data from a form post. Im getting no errors but im getting nothin output. Here is the HTML:
Code:
<form method="post" action="EsendexAccountEventHandler.pl">
<input type="hidden" name="value1" value="test1">
<input type="hidden" name="value2" value="test2">
<input type="hidden" name="value3" value="test3">
<input type="submit">
</form>
Here is the perl script it posts to:
Code:
$length = $ENV{'CONTENT_LENGTH'};
read(STDIN,$data,$length);
print $data;
Think i am not reading in the form vaules correctly, but i was told STDIN would do it?!

Thanks in advance :)
 
it all seems o.k.

is your Perl script as follows:-

Code:
[b]#!/usr/bin/perl[/b]

print "Content-type: text/html\n\n";

$length = $ENV{'CONTENT_LENGTH'};
read(STDIN,$data,$length);
print $data;

and set to 755 permissions?


Kind Regards
Duncan
 
use CGI.pm ...
Code:
#!/usr/bin/perl
use CGI;

$q= new CGI;
print $q->header;
print $q->param('value1');
print $q->param('value2');
print $q->param('value3');

Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Wasn't running it correctly on IIS.
Thanks for input, using CGI module now and it works a treat!
[2thumbsup][2thumbsup][2thumbsup][2thumbsup][2thumbsup][2thumbsup][2thumbsup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top