|
Posted by ccc31807 on March 24, 2008, 7:08 pm
Please log in for more thread options
> Hello everyone,
>
> I am trying to write a program in perl (windows) that I will use to
> fill out online form.
I assume that since you can write scripts on the server that you have
access to the httpd. This is how I would do it.
1. Configure your httpd for cgi. Then, write a test script to make
sure it works. You can configure your web server a couple of different
ways, so pick the one you like.
2. On the client side, make your html form the way you normally do.
<html><body>
<form action='post' method='/myurl/cgi-bin/form.cgi'>
<input type='text' name='week' />
<input type='submit' value='OK' />
</form>
</body></html>
3. On the server side use CGI.
#!/usr/bin/perl;
use CGI;
use strict;
my $week = param('week');
print "Content-type: text/html\n\n";
print "<html><body>My week is $week</body></html>
exit();
CC
|