| | |
Not sending Feedback Form
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Apr 2004
Posts: 1
Reputation:
Solved Threads: 0
Help!!!
I have written the following php for a feedback form. the problem i am facing is the following:
When the
$mailto = 'yiannos@mydomain.com' ;
is written the script works perfect and the email is send.
When the
$mailto = 'yiannos@mydomain.com.cy' ;
is written and no other changes in the script the email is NOT send. the only difference is that my domain has a .cy at the end.
Please, Any help will be appreciated
My Code Follows
___________________________
<?
$mailto = 'yiannos@mydomain.com.cy' ;
$subject = "Customer Enquiry From www.erotokritou.net" ;
$formurl = "http://www.domain.com/html/contact.html" ;
$errorurl = "http://www.domain.com/html/error.htm" ;
$thankyouurl = "http://www.domain.com/html/thankyou.htm" ;
$name = $_POST['name'] ;
$mobile = $_POST['mobile'] ;
$email = $_POST['email'] ;
$homephone = $_POST['homephone'] ;
$property = $_POST['property'] ;
$area = $_POST['area'] ;
$range = $_POST['range'] ;
$type = $_POST['type'] ;
$needloan = $_POST['needloan'] ;
$nearsea = $_POST['nearsea'] ;
$nearschool = $_POST['nearschool'] ;
$airport = $_POST['airport'] ;
$comments = $_POST['comments'] ;
if (!isset($_POST['email'])) {
header( "Location: $formurl" );
exit ;
}
if (empty($name)) {
header( "Location: $errorurl" );
exit ;
}
if (empty($mobile) && empty($email) && empty($homephone)) {
header( "Location: $errorurl" );
exit ;
}
$messageproper =
"You have an enquiry From your contact page at www.domain.com the details are listed below\n\n" .
" -------------------- Request Details -----------------------\n\n" .
" -----------------------------------------------\n" .
" | Customers Details |\n" .
" -----------------------------------------------\n\n" .
" Name = " ."$name\n" .
" Mobile Telephone Number = " ."$mobile\n" .
" Home Telephone Number = " ."$homephone\n" .
" E-mail Address = " ."$email\n\n" .
" -----------------------------------------------\n" .
" | Property Details |\n" .
" -----------------------------------------------\n\n" .
" Property Required =" ."$property\n" .
" Area = " ."$area\n" .
" Price Range =" ."$range\n".
" Ready or Custom Built = "."$type\n".
" Loan Required = "."$needloan\n".
" Near The Sea = "."$nearsea\n" .
" Near School = " ."$nearschool\n" .
" Pick up from airport = " ."$airport\n\n" .
"---Any Additional Comments------------------------------------- \n\n " .
"$comments\n" .
"\n\n-End of form-----------------------------------------------------------\n" ;
mail($mailto, $subject, $messageproper, "From: \"$name\" <$email>\nReply-To: \"$name\" <$email>" );
header( "Location: $thankyouurl" );
exit ;
?>
I have written the following php for a feedback form. the problem i am facing is the following:
When the
$mailto = 'yiannos@mydomain.com' ;
is written the script works perfect and the email is send.
When the
$mailto = 'yiannos@mydomain.com.cy' ;
is written and no other changes in the script the email is NOT send. the only difference is that my domain has a .cy at the end.
Please, Any help will be appreciated
My Code Follows
___________________________
<?
$mailto = 'yiannos@mydomain.com.cy' ;
$subject = "Customer Enquiry From www.erotokritou.net" ;
$formurl = "http://www.domain.com/html/contact.html" ;
$errorurl = "http://www.domain.com/html/error.htm" ;
$thankyouurl = "http://www.domain.com/html/thankyou.htm" ;
$name = $_POST['name'] ;
$mobile = $_POST['mobile'] ;
$email = $_POST['email'] ;
$homephone = $_POST['homephone'] ;
$property = $_POST['property'] ;
$area = $_POST['area'] ;
$range = $_POST['range'] ;
$type = $_POST['type'] ;
$needloan = $_POST['needloan'] ;
$nearsea = $_POST['nearsea'] ;
$nearschool = $_POST['nearschool'] ;
$airport = $_POST['airport'] ;
$comments = $_POST['comments'] ;
if (!isset($_POST['email'])) {
header( "Location: $formurl" );
exit ;
}
if (empty($name)) {
header( "Location: $errorurl" );
exit ;
}
if (empty($mobile) && empty($email) && empty($homephone)) {
header( "Location: $errorurl" );
exit ;
}
$messageproper =
"You have an enquiry From your contact page at www.domain.com the details are listed below\n\n" .
" -------------------- Request Details -----------------------\n\n" .
" -----------------------------------------------\n" .
" | Customers Details |\n" .
" -----------------------------------------------\n\n" .
" Name = " ."$name\n" .
" Mobile Telephone Number = " ."$mobile\n" .
" Home Telephone Number = " ."$homephone\n" .
" E-mail Address = " ."$email\n\n" .
" -----------------------------------------------\n" .
" | Property Details |\n" .
" -----------------------------------------------\n\n" .
" Property Required =" ."$property\n" .
" Area = " ."$area\n" .
" Price Range =" ."$range\n".
" Ready or Custom Built = "."$type\n".
" Loan Required = "."$needloan\n".
" Near The Sea = "."$nearsea\n" .
" Near School = " ."$nearschool\n" .
" Pick up from airport = " ."$airport\n\n" .
"---Any Additional Comments------------------------------------- \n\n " .
"$comments\n" .
"\n\n-End of form-----------------------------------------------------------\n" ;
mail($mailto, $subject, $messageproper, "From: \"$name\" <$email>\nReply-To: \"$name\" <$email>" );
header( "Location: $thankyouurl" );
exit ;
?>
![]() |
Similar Threads
- sending a feedback form to email in asp.net (ASP.NET)
- Weird feedback form idea .... (JavaScript / DHTML / AJAX)
- feedback form for website based on Unix server (PHP)
- feedback form in vb (ASP.NET)
- Generate Free Feedback Form (Existing Scripts)
Other Threads in the PHP Forum
- Previous Thread: what is apache server?
- Next Thread: Opening files on a browser
| Thread Tools | Search this Thread |
# 5.2.10 access action address alexa apache api array auto autoincrement broken cakephp checkbox class classes clean clients cms code cron curl database date dehasher destroy directory dissertation domain dynamic echo$_get[x]changingitintovariable... email encode error errorlog fairness fatalerror file folder form function functions google href htaccess html image include indentedsubcategory ip javascript joomla legislation limit link load local login masterthesis memberships menu multiple multipletables mysql mysqlquery newsletters oop open passwords paypal pdf persist php popup provider query radio random script search secure server sessions simple sockets source space spam sql system table tutorial upload url user variable video voteup web youtube





