Dear Simon,

You need to check your form fields. As per your code comment below;

//if "email" is not filled out, display the form

I expect your form below the comment unless your form action is pointing to
this file.

Something like ;

echo "<form method='post' action='test.php'>
.....
...

Also your test file should end with a .php instead of the test.htm you have
just sent.


Regards,


-- 
patrick patons
creative apps developer/dba
www.ocira.net | patrick at ocira dot net






On Fri, Dec 18, 2009 at 10:12 AM, Simon Mutama <[email protected]>wrote:

> Hi all,
>
> I am running a debian proxy server with dansguardian as a web content
> filtering system.
>
> If a user tries to visit a site and is blocked by dansguardian, the
> user is redirected to a page advising them what is occuring and with
> the option to request the site to be unblock via a form on the page.
>
> My problem is that when the user fills in and submits via the form, I
> do not get email as is supposed to happen. My code for the form is
> below. The page containing the form is saved as mailform.php in the
> folder /var/www/
>
> Testing if php is successfully installed using a test page with the
> phpinfo() funtion is successful and I can send email via the command
> line mail command successfully.
>
> Any help with resolving this highly appreciated.
>
> Regards,
>
> Simon
>
> <html>
> <body>
>
> <?php
> if (isset($_REQUEST['email']))
> //if "email" is filled out, send email
>  {
>  //send email
>  $email = $_REQUEST['email'] ;
>  $subject = "Proxy unblock request" ;
>  $message = $_REQUEST['site'] ;
>  mail( "[email protected]", "Subject: $subject", $message, "From:
> $email" );
>  echo "Thank you for using our mail form";
>  }
> else
> //if "email" is not filled out, display the form
>  {
>  echo "You must enter your full email address. Please press 'back' &
> try again";
>  }
> ?>
>
> </body>
> </html>
>
> _______________________________________________
> LUG mailing list
> [email protected]
> http://kym.net/mailman/listinfo/lug
> %LUG is generously hosted by INFOCOM http://www.infocom.co.ug/
>
> The above comments and data are owned by whoever posted them (including
> attachments if any). The List's Host is not responsible for them in any way.
> ---------------------------------------
>
>
>
_______________________________________________
LUG mailing list
[email protected]
http://kym.net/mailman/listinfo/lug
%LUG is generously hosted by INFOCOM http://www.infocom.co.ug/

The above comments and data are owned by whoever posted them (including 
attachments if any). The List's Host is not responsible for them in any way.
---------------------------------------

Reply via email to