...

View Full Version : form and CGI



emma85
08-28-2002, 03:28 PM
take a look at this page:
http://www.beeweeb.com/download/dlmapper2k.shtml

I like to do one of them validation forms. that is: the webuser first fills in a form with required fields, and if the form is filled with address and ph and such the user gets to download, but if not -> no download!
simple?
I can't figure it out. do I need cgi for this?
or maybe some more computer awareness...

/emma

mr_ego
08-29-2002, 01:49 PM
yeah you would have to do this with CGI.

something like this



#!/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);
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum