I'm new to this so I apologise if I'm asking something that has been asked before. Basically I want a form on my site but I know that mailto is no longer supported.
So whats the easiest way to do a form?
I have checked out [nms-cgi.sourceforge.net...] but found it very confusing. I did matt's form script years ago but have now totally forgot even where to put each file etc.
Where is the best place to start?
Many thanks
<form action=myscript.cgi method=post>
Change "myscript.cgi" to the name of whatever script you download. Some webhosts let you put the script anywhere, some require it go in a cgi-bin folder. If it's the latter then your form will say action=/cgi-bin/myscript.cgi.
Matt's script is well documented, just read the help that's freely provided.
For instance:
In a name input you'd probably only want letters & spaces:
if ($name!~ m/^[a-zA-Z\s]+$/) {
error
}
else {
ok
}
if ($email!~ /^[A-Z0-9][_\-\.A-Z0-9]*\@\[?[\-\.A-Z0-9]+\.([A-Z]{2,4}¦[0-9]{1,3})\]?$/i) {
error
}
else {
ok
}
$inputLENGTH = length ($input);
if (($inputLENGTH < $my_min_value)¦¦($inputLENGTH > $my_max_value)) {
error
}
else {
ok
}
[informationweek.com...]