Hello,
I'm using the following codes to create a survey for a website. On February 1, this code was working and I tested it nearly 40 times and got responses in my email.
However, today when I test it, it doesn't work!!
What happened? Does anyone have a suggestion:
the HTML is:
<form action="survey.php" method="post">
<p>Your Name:
<input type="text" name="name">
<br>
E-mail:
<input type="text" name = "email">
<br>
<br>
1. As an Independent hotelier, what would you classify as your strengths?<br>
<textarea name="question1" rows="6" cols="30"></textarea>
<br>
2. What would you classify as your weaknesses?<br>
<textarea name="question2" rows="6" cols="30"></textarea>
<br>
3. What type of customer service/sales training (ex.training manual/on-site trainer)
do you have in place at this time?<br>
<textarea name="question3" rows="6" cols="30"></textarea>
<br>
4. Is your property currently using a CRM system (Customer Relationship Management)?<br>
<label> <br />
<input type="radio" name="question4" value="yes" />
yes</label>
<br />
<label>
<input type="radio" name="question4" value="no" />
no</label>
</p>
<p>5. Do you have an interactive website or webpage for your property?
<label> <br />
<input type="radio" name="question5" value="yes" />
yes</label>
<br />
<label>
<input type="radio" name="question5" value="no" />
no</label>
</p>
<p>6. Are you currently satisfied with your occupancy, revpar and revenue #'s?
If no, please explain.</p>
<p>
<textarea name="question6" rows="6" cols="30"></textarea>
</p>
<p>7. Do you feel you are currently getting the fair share of your market?
<label> <br />
<input type="radio" name="question7" value="yes" />
yes</label>
<br />
<label>
<input type="radio" name="question7" value="no" />
no</label>
</p>
<p>8. Do you have a strong brand/presence in your market
<label> <br />
<input type="radio" name="question8" value="yes" />
yes</label>
<br />
<label>
<input type="radio" name="question8" value="no" />
no</label>
</p>
<p>9. Is your property being actively promoted at this time?
<label> <br />
<input type="radio" name="question9" value="yes" />
yes</label>
<br />
<label>
<input type="radio" name="question9" value="no" />
no</label>
</p>
<p>10. Do you currently have a sales and marketing team on-site? What are their
roles?</p>
<p>
<textarea name="question10" rows="6" cols="30"></textarea>
</p>
<p>11. If no to #10, please explain how a sales and marketing team or company
would benefit your property. </p>
<p>
<textarea name="question11" rows="6" cols="30"></textarea>
<br>
<br>
<input type="submit" value="Submit">
</p>
</form>
the PHP is:
<?
function checkOK($field)
{
if (eregi("\r",$field) || eregi("\n",$field)){
die("Invalid Input!");
}
}
$name=$_POST['name'];
checkOK($name);
$email=$_POST['email'];
checkOK($email);
$question1=$_POST['question1'];
checkOK($question1);
$question2=$_POST['question2'];
checkOK($question2);
$question3=$_POST['question3'];
checkOK($question3);
$question4=$_POST['question4'];
checkOK($question4);
$question5=$_POST['question5'];
checkOK($question5);
$question6=$_POST['question6'];
checkOK($question6);
$question7=$_POST['question7'];
checkOK($question7);
$question8=$_POST['question8'];
checkOK($question8);
$question9=$_POST['question9'];
checkOK($question9);
$question10=$_POST['question10'];
checkOK($question10);
$question11=$_POST['question11'];
checkOK($question11);
$to="sgambilldesign@gmail.com";
$message="$name just completed the survey. Answers are as follows: \n 1.$question1\n\n \n 2.$question2\n\n \n 3.$question3\n\n \n 4.$question4\n\n \n 5.$question5\n\n \n 6.$question6\n\n \n 7.$question7\n\n \n 8.$question8\n\n \n 9.$question9\n\n \n 10.$question10\n\n \n 11.$question11\n\n Their e-mail address is: $email";
if(mail($to,"IHospitality Survey",$message,"From: $email\n")) {
header( "Location: http://www.ihospitalitytn.com/thankyou.html" );
}
?>
can anyone help me

? thanks so much!