Thread: form and CGI
View Single Post
Old 08-29-2002, 12:49 PM   PM User | #2
mr_ego
Regular Coder

 
Join Date: Jun 2002
Location: Brisbane, Australia
Posts: 181
Thanks: 1
Thanked 0 Times in 0 Posts
mr_ego is an unknown quantity at this point
yeah you would have to do this with CGI.

something like this

Code:
#!/usr/bin/perl

use CGI qw(param);

$name = param("name");
$phone = param("phone");

if ((!$name) && (!$phone)) {
 print "You didnt enter the fields required";
} else {
 print "Location: download.zip"; # the location of the file to be downloaded (dont worry they most likely wont see this)
 open(STORE,"store.txt");
  print STORE "Name: $name\nPhone: $phone\n";
 close(STORE);
}
mr_ego is offline   Reply With Quote