wilku-
I created a new form with this code:
<form method="POST" action="process.php">
<input type=hidden name="recipient" value="quiz@shapefit.com">
<input type=hidden name="subject" value="Fitness I.Q. Quiz Entry">
<input type=hidden name="print_config" value="email,subject">
<input type=hidden name="redirect"value="http://www.shapefit.com/thankyou-quiz.html">
<input type=hidden name="env_report" value="REMOTE_HOST, HTTP_USER_AGENT">
<input type=hidden name="required" value="FullName,email,Referred By">
<div align="center">
<p><br>
Full Name <br>
<input type="text" name="FullName" size="25">
</p>
<p>Email Address:<br>
<input type="text" name="email" size="25">
</p>
<p>How did you find us?<br>
<input type="text" name="Referred By" size="25">
</p>
<p>If you found us through a search <br>
engine, what were you searching for?<br>
<input type="text" name="Searching For" size="25">
</p>
<p>
<input type="checkbox" name="Yes, Sign Me Up For The Newsletter" value="checkbox" checked>
Yes, I would like to sign up for your <b>FREE</b> newsletter!<br>
<br>
<br>
<input name="subscribe" type="image" alt="fitness quizzes" src="start-quiz2.gif">
</p>
</div>
</form>
I then created a file called "process.php" and included this code:
<?php
if (isset($POST['newsletter'])&&$POST['newsletter']=="checkbox")
{
$name_arr = explode($POST['FullName'])
$first_name = $name_arr[0];
$file_arr = file($flat_file);
$found = false;
foreach ($file_arr as $value) {
if (strpos($POST['email']) !== false) {
$found = true;
break;
}
}
if (!$found) {
$fp = fopen($flat_file, 'a');
$fwrite($fp,$POST['email'] . ',' . $POST['FullName'] . "\n");
fclose($fp);
)
}
?>
However, now I'm receiving this error when submitting the form:
Parse error: parse error in /home/httpd/vhosts/aimtraffic.com/httpdocs/test/process.php on line 5
Line 5 is:
$first_name = $name_arr[0];