• Welcome to AcornDomains.co.uk, a friendly community for UK domain investors, developers and anyone interested in domain names.

    Whether you're looking to buy or sell domains, learn more about the UK domain market, get feedback on your names, or simply chat with other domainers, you're in the right place. AcornDomains has been bringing together people from across the UK domain industry for many years, from complete beginners to experienced investors.

    Have a look around, join the discussions and, if you haven't already, create a free account and introduce yourself.

Contact.php problems

Status
Not open for further replies.
Joined
Jul 20, 2008
Posts
184
Reaction score
4
Hello all, I`m having problems with my contact form

The problem with the contact form is it doesnt seam to work all the time (works very rarely) and doesnt send an email to say thankyou for contacting us (set up in my microsoft office outlook somewhere that i cannot find for the life off me) is there something wrong with this?

HTML:
<?php 

$message= '<table width="98%" border="0" cellspacing="0" cellpadding="3"> 

<tr>
<td colspan="2" valign="top" class="arialblack">
<div align="center"><strong>Customer Details</strong><br><br></div></td>
</tr> 

<tr>
<td width="30%" valign="top" class="arialblack">Full Name:</td>
<td width="70%" valign="top" class="arialblack">'.$_POST['fullname'].'</td>
</tr>

<tr>
<td width="30%" valign="top" class="arialblack">Business Name:</td>
<td width="70%" valign="top" class="arialblack">'.$_POST['businessname'].'</td>
</tr> 

<tr>
<td width="30%" valign="top" class="arialblack">Address:</td>
<td width="70%" valign="top" class="arialblack">'.$_POST['address'].'</td>
</tr> 

<tr>
<td width="30%" valign="top" class="arialblack">Post Code:</td>
<td width="70%" valign="top" class="arialblack">'.$_POST['postcode'].'</td>
</tr>

<tr>
<td width="30%" valign="top" class="arialblack">Email:</td> 
<td width="70%" valign="top" class="arialblack">'.$_POST['emailaddress'].'</td> 
</tr> 

<tr>
<td width="30%" valign="top" class="arialblack">Phone Number:</td> 
<td width="70%" valign="top" class="arialblack">'.$_POST['phonenumber'].'</td> 
</tr> 

</table>'; 


$email = "info@#####.co.uk"; 
$emailm = "info@#####.co.uk"; 
$from = $email;
$subject = "#####.co.uk Enquiry";

$headers= "MIME-Version: 1.0\r\n";
$headers.= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers.= "From: $from\r\n";

mail($emailm, $subject, $message, $headers); 

header('location:http://www.#####.co.uk/thankyou.html')


?>

Thanks for any help
 
Just tried it about 20 times works fine, maybe a mail server issue?
 
I presume this is the where the form gets sent to, I ran the file and it worked fine.
 
Hi this is just the contact.php file, the other part is fine and it all matches up, i think the problem lies in the bottom part
HTML:
$email = "info@#####.co.uk"; 
$emailm = "info@#####.co.uk"; 
$from = $email;
$subject = "#####.co.uk Enquiry";

$headers= "MIME-Version: 1.0\r\n";
$headers.= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers.= "From: $from\r\n";

mail($emailm, $subject, $message, $headers); 

header('location:http://www.#####.co.uk/thankyou.html')


?>

But i dont know what is the problem???

It does work sometimes but alot of the time it doesnt...

I could really do with a fully functional contact.php file that i could just take the bottom part out and change my email if anybody has one?

also how could i make it safer as well so i dont get spam?

Thanks
 
Thanks for the replys everyone, the contact form seems to work now!!! but it always seams to go to the thankyou page no matter what, wether the form is filled in or not, i have tried adding the captcha but it still always goes to the thankyou page just doesnt send the form details...

Is there anyway i can sort this out?

Thanks
 
Status
Not open for further replies.
Top Bottom