Buy Sell Discuss UK Domain Names at AcornDomains.co.uk

Today's Drop Dates are: 19-02-2012 or 26-02-2012   All times are GMT. The time now is 12:43:59 PM.
Domain Name Sales Domain Software Calculate UK Domain Drop Dates Domain Registration NameDrive Domain Parking Subscribe to our Domains For Sale newsletter
Go Back   Domain Forum Acorn Domains Buy Sell Auction UK Domains > Website Design and Promotion > Website Design > Scripts and Coding
Connect with Facebook

Scripts and Coding PHP, MySQL, scripts

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 01-02-2011, 08:38:14 PM     #1 (permalink)

 
Join Date: Jul 2008
Location: Lancashire
Posts: 161
slowhost is on a distinguished road

Contact.php problems

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 Code:
<?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
slowhost is offline  
Old 02-02-2011, 12:02:50 AM     #2 (permalink)

 
Aaron Clifford's Avatar
 
Join Date: Jun 2010
Location: Kent
Posts: 1,804
Aaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond repute

Just tried it about 20 times works fine, maybe a mail server issue?
__________________
DomainBeans - Domain & Affiliate Developer
Aaron Clifford is offline  
Old 02-02-2011, 07:16:46 AM     #3 (permalink)

 
bensd's Avatar
 
Join Date: Jan 2007
Location: Wiltshire, UK
Posts: 4,148
bensd has a reputation beyond reputebensd has a reputation beyond reputebensd has a reputation beyond reputebensd has a reputation beyond reputebensd has a reputation beyond reputebensd has a reputation beyond reputebensd has a reputation beyond reputebensd has a reputation beyond reputebensd has a reputation beyond reputebensd has a reputation beyond reputebensd has a reputation beyond repute

Is this all of your code?

I haven't tried it, but with an initial glance; where are the form elements and submit button?

Last edited by bensd; 02-02-2011 at 07:19:14 AM.
bensd is offline  
Old 02-02-2011, 07:56:10 AM     #4 (permalink)

 
jimm's Avatar
 
Join Date: Feb 2008
Location: North Yorkshire
Posts: 673
jimm has a reputation beyond reputejimm has a reputation beyond reputejimm has a reputation beyond reputejimm has a reputation beyond reputejimm has a reputation beyond reputejimm has a reputation beyond reputejimm has a reputation beyond reputejimm has a reputation beyond reputejimm has a reputation beyond reputejimm has a reputation beyond reputejimm has a reputation beyond repute

Quote:
Originally Posted by bensd View Post
Is this all of your code?
It cant be, It only constructs a message.

Also that code looks like it could be exploited quite easily to send spam.
__________________
Fov.cc | EvoOwners.co.uk | Forget Debt | xFTP | Jaimee | Linux Book | ESE Pods | Music Quotes
Affordable Server Admin - PM me!
jimm is offline  
Old 02-02-2011, 10:46:07 AM     #5 (permalink)

 
Aaron Clifford's Avatar
 
Join Date: Jun 2010
Location: Kent
Posts: 1,804
Aaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond repute

I presume this is the where the form gets sent to, I ran the file and it worked fine.
__________________
DomainBeans - Domain & Affiliate Developer
Aaron Clifford is offline  
Old 02-02-2011, 12:54:25 PM     #6 (permalink)

 
Join Date: Jul 2008
Location: Lancashire
Posts: 161
slowhost is on a distinguished road

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 Code:
$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
slowhost is offline  
Old 02-02-2011, 03:57:57 PM     #7 (permalink)

 
Aaron Clifford's Avatar
 
Join Date: Jun 2010
Location: Kent
Posts: 1,804
Aaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond reputeAaron Clifford has a reputation beyond repute

It works fine!

maybe ad a ; after:

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

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

But i've tried it about 20 times and recieved email everytime, must be a mail server problem, maybe its identifying it as spam.
__________________
DomainBeans - Domain & Affiliate Developer
Aaron Clifford is offline  
Old 04-02-2011, 06:26:49 PM     #8 (permalink)

 
Join Date: Jul 2008
Location: Lancashire
Posts: 161
slowhost is on a distinguished road

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
slowhost is offline  
Closed Thread



Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Domain Name Community Replies Last Post
More computer problems Systreg General Board 28 01-01-2011 04:17:46 PM
Register.com suffers DNS problems - Inquirer RSS Domain Name News 0 02-04-2009 08:59:04 PM
Whitelisting of domain names leads to email spam problems for ... - SC Magazine UK RSS Domain Name News 0 13-02-2009 01:59:02 PM
123-reg problems goldman General Board 2 07-05-2006 07:18:25 PM

Domain Sponsor 2


All times are GMT. The time now is 12:43:59 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.0 RC 2
All content on Acorn Domains is member generated and is not moderated before posting. All content is viewed and used by you at your own risk and AD does not warrant the accuracy or reliability of any of the information. The views expressed are those of the individual contributors and not necessarily those of AD. Please contact us to report any issues or send a PM to "Admin".