# %form is a hash that contains all the values # that the person entered on the form. It is global # IF THE USER SELECTED EMAIL..DO THIS CODE if ($form{attachme} eq "yes") { $query =~ s/(and|or)$//; # Strip off trailing AND/OR my ($values, $pid); if ($pid = fork) { # Send the data by email if option selected # The 'Search Was Successful' note has been moved to # the correct directory on the hard drive # and the script redirects the user to that page. # This is to stop HTTPD from hanging. # users'printvtml is just like vtml'printvtml, EXCEPT that the # Content Type text/html line has been replaced with a Location header # to redirect the user to the note saying that the email has been sent. $form{-nextpage} = "/admin/users/reports/mailview.vtml"; # This is a function that we use to print to the screen. # It is not causing this problem. &users'printvtml($URLPREFIX."$form{-nextpage}",\%form,\%script); exit (0); } elsif (defined $pid) { # CHILD PROCESS GOES HERE if ( $form{which} eq "custom" ) { $values = $form{retval}; } elsif ( $form{which} eq "all" ) { $values = $form{allval}; } exec ("perl $fork_to $form{sendto} \"$query\" $values"); exit (0); } exit (0); }