Jump to content

parse error on line 37 help..


co.ador

Recommended Posts

 

 

Parse error: parse error in C:\wamp\www\senderomusical\danielon.php on line 37

 

 

<?php 
echo '<div id="tresu"> 
<p><b>La operacion no pudo ser hecha por favor trate de nuevo</b><br/><br/><br/> 
Please resubmit the form after making
the following changes:
<div id="tres">';
	echo "<ul>";
foreach (
{ // line 37
	echo "<li>" . $e['msg'];
}   
echo "</ul>";
    echo'</div>
         </div>';
}


?>

Link to comment
https://forums.phpfreaks.com/topic/191285-parse-error-on-line-37-help/
Share on other sites

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link href="style.css" rel="stylesheet" type="text/css" />
<?php 
include("validationclass.php");

$name = $_POST['nombre'];
$apellido = $_POST['apellido'];
$email= $_POST['email'];
$pais = $_POST['pais'];
$ciudad = $_POST['ciudad'];
$message = $_POST['mensaje'];

$fv = new FormValidator();

$fv->isEmpty("name", "Por favor entre su nombre");
$fv->isEmpty("apellido", "Por favor entre suapellido");
$fv->isEmpty("email", "Por favor entre su email");
$fv->isEmpty("pais", "Por favor entre su pais");
$fv->isEmpty("ciudad", "Por favor entre su ciudad");
$fv->isEmpty("mensaje", "Por favor entre su mensaje");

if ($fv->isError())
{
$errors = $fv->getErrorList();
echo '<div id="tresu"> 
<p><b>La operacion no pudo ser hecha por favor trate de nuevo</b><br/><br/><br/> 
Please resubmit the form after making
the following changes:
<div id="tres">';
	echo "<ul>";
foreach (
{
	echo "<li>" . $e['msg'];
}   
echo "</ul>";
    echo'</div>
         </div>';


}
else
{

// do something useful with the data


//TO, Subject, Message, Header

mail('<[email protected]>','Contact us Message',$message,$appellido,$pais,$ciudad,$mensaje,'From:'.$name.'<'. $email.'>');
header('Location:mensajedegracias.php');

}

?>
</body>
</html>

 

that's a form to be validated and if all the fields are not empty then send the message but the foreach is throwing a parse error.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.