![]() |
| Domain Name Sales | Domain Software | Calculate UK Domain Drop Dates | Domain Registration | NameDrive | Domain Parking | Subscribe to our Domains For Sale newsletter |
| | ||||||
| Home | Register | Rules | Membership Upgrade | Domains For Sale | Domain Name Escrow | Mark Forums Read | Domain Classified | Chat Room |
| Scripts and Coding PHP, MySQL, scripts |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
![]() | 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')
?> |
| |
| | #2 (permalink) |
![]() |
Just tried it about 20 times works fine, maybe a mail server issue?
__________________ DomainBeans - Domain & Affiliate Developer |
| |
| | #3 (permalink) |
![]() |
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. |
| |
| | #4 (permalink) |
![]() | 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! |
| |
| | #5 (permalink) |
![]() |
I presume this is the where the form gets sent to, I ran the file and it worked fine.
__________________ DomainBeans - Domain & Affiliate Developer |
| |
| | #6 (permalink) |
![]() |
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')
?> 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 |
| |
| | #7 (permalink) |
![]() |
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 |
| |
| | #8 (permalink) |
![]() |
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 |
| |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
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 |