The problem is most likely in fem.pl. Initialise all variables before use, 
if you use any temporary files be sure to create a unique name. The thing 
is it's entirely possible that multiple instances of the script will be 
run at the same time. 

quoting from a perl doc;
Or you can use the C<tmpnam> function from the POSIX module to get a
filename that you then open yourself.  Use this if you do need to know
the file's name.

    use Fcntl;
    use POSIX qw(tmpnam);

    # try new temporary filenames until we get one that didn't already
    # exist;  the check should be unnecessary, but you can't be too 
careful
    do { $name = tmpnam() }
        until sysopen(FH, $name, O_RDWR|O_CREAT|O_EXCL);

unquote

As an aside what does the SPAN tag do? I've not seen that one.


On 15 Feb 2002, Gonzalo Servat wrote:

> Hi all
> 
> I have a simple HTML file like the following:
> 
> <HTML>
> <HEAD>
> <TITLE>TEST</TITLE>
> <FORM ACTION="/fem.pl">
> <SPAN CLASS="text">Name</SPAN>
> <INPUT NAME="Name" SIZE=40>
> <BR>
> <SPAN CLASS="text">Email</SPAN>
> <INPUT NAME="email" SIZE=20>
> <INPUT TYPE=HIDDEN NAME="recipient" VALUE="[EMAIL PROTECTED]">
> <INPUT TYPE=HIDDEN NAME="redirect" VALUE="/contact/redirect.html">
> </FORM>
> </HTML>
> </HEAD>
> 
> The strange problem I'm having is that the first 4 people might go to
> this form and type in their name and email address and I get the 4
> emails. However, the 5th person may put their name in and email and I'll
> get the form, but the 4th person's details will come along in the same
> email.
> 
> I've tried 2 or 3 cgi scripts to process the form and got the same
> result. I've tried using qmail and sendmail and no luck so I think all
> that's left is something in Apache.
> 
> Before I go and play with Apache I thought I'd ask on SLUG to see if
> anyone else had the same problem.
> 
> Thanks in advance for any help!
> 
> Gonzalo.
> 
> 
> 

-- 
---<GRiP>--- 
Web: www.arcadia.au.com/gripz 
Answering Machine/fax: 02 4950 1194 (wait 5 mins if no answer)
Mobile: 0408 686 201

-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to