Hi , I need some help
I have just created a php to process my contact form
but each time is press sumbit in my form, my php doesnt run , i just an error message
i get this message
Internal Server ErrorThe server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, or webmaster and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Here the PHP code am tryin to run
<?php
$to = "-f contact@whbchurch.org.uk";
$subject = "Contact Form Message";
$email = $_REQUEST['temail'] ;
$femail = "contact@whbchurch.org.uk ;
$ename = $_REQUEST['ename'] ;
$phone = $_REQUEST['phone'] ;
$comment = $_REQUEST['comment'];
$suggestion = $_REQUEST['suggestion'] ;
$headers = "From: $email";
$sent = mail($to, $subject, $ename, "From: $femail") ;
if($sent)
{print "Your mail was sent successfully";}
else
{print "We encountered an error sending your mail"; }
?>
HERE IS HTML Code calling the PHP
<body>
<form action="/cgi-bin/addcomm" method="post" name="enquiry" onSubmit="return checkEqry();">
<input type="hidden">
<tr align="left">
<p><h4>Contact Us</h4></p>
<p>Please complete the form below to get intourch. </p>
<pre>
<p>Name: <input type="text" name="ename" size="45" />
<p>Email: <input type="text" name="temail" size=45" />
<p>Telephone: <input type="text" name="phone" size="45" />
<p>How did you hear of us? <select name="suggestion"/>
<p><option selected> Make a selection </option>
<p><option> Web Search </option>
<p><option> From a Church Member</option>
<p><option> Other </option>
<p><option>Email</option>
</select>
<p>Enquiry/Comments/Request
<textarea name="comment" rows="6" cols="40" />
</textarea>
<input type="submit">
</pre>
</tr>
</form>
</body>
Any suggestions will be nice... Thanx
Solved! Go to Solution.
hi
I Finally solve the problem
I first had to include Formmail as part of my setup when creating my webpage and
it worked perfectly
many thanks everyone for all your help..
Regards
Is looks like the following line is wrong as it's not pointing at your .php file:
<form action="/cgi-bin/addcomm"
I have made changes to my PHP , now the PHP scripts runs, but only a blank screen appears ...i need help
seems the PHP excutes but nothin is showing
HELP HELP HELP
Can anyone from BT HELP .........???????
Hi westthendon111,
Can you post a screenshot of the error please.
Many thanks
Tracey
BT Forum Moderator
hi
I Finally solve the problem
I first had to include Formmail as part of my setup when creating my webpage and
it worked perfectly
many thanks everyone for all your help..
Regards
hi...
I am new to php but i know sql.
Can anyone briefly explain about php or give me some links.
Thanks in advance...
...............
<URL Removed by Moderators>
Hello,
Here is a site that I have found very resourceful:
http://www.w3schools.com/PHP/DEfaULT.asP
Peter