Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/12/2009, 11:12
renzilla
 
Fecha de Ingreso: diciembre-2009
Mensajes: 34
Antigüedad: 14 años, 4 meses
Puntos: 0
AYUDA configuracion con formulario y configuracion php

les adjunto el codigo de mi formulario:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Formulario</title>
<style type="text/css">
<!--
body,td,th {
color: #F60;
}
body {
background-color: #FFF;
}
body div {
color: #F30;
}
body {
color: #F30;
}
body div {
color: #F60;
}
-->
</style>
<script type="text/javascript">
<!--
function MM_validateForm() { //v4.0
if (document.getElementById){
var i,p,q,nm,test,num,min,max,errors='',args=MM_valida teForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
} if (errors) alert('The following error(s) occurred:\n'+errors);
document.MM_returnValue = (errors == '');
} }
//-->
</script>
</head>

<body>
<div align="center"><strong>ESCUELA DE DANZA CONTEMPORÁNEA </strong></div>
<br>
<div align="center"><font color="#000000">Para mayor información llena el siguiente formulario y nos pondremos en contacto contigo</font> </div><br>
<form action="formula.php" method="post" target="_self" id="formulario" onsubmit="MM_validateForm('nombreinteresado','','R ','apellidopat','','R','apellidomat','','R','email ','','RisEmail');return document.MM_returnValue">
<table align="center">
<tr>
<td align="right" valign="top"><label for="nombreinteresado">Nombre</label></td>
<td><input name="nombreinteresado" type="text" id="nombreinteresado" onblur="MM_validateForm('nombreinteresado','','R') ;return document.MM_returnValue" /></td>
</tr>
<tr>
<td align="right" valign="top"><label for="apellidopat">Apellido Paterno</label></td>
<td><input name="apellidopat" type="text" id="apellidopat" onblur="MM_validateForm('apellidopat','','R');retu rn document.MM_returnValue" /></td>
</tr>
<tr>
<td align="right" valign="top"><label for="apellidomat">Apellido Materno</label></td>
<td><input name="apellidomat" type="text" id="apellidomat" onblur="MM_validateForm('nombreinteresado','','R') ;return document.MM_returnValue" /></td>
</tr>
<tr>
<td align="right" valign="top"><label for="documentoid">Documento de Identidad</label></td>
<td><select name="documentoid" id="documentoid">
<option>DNI</option>
<option>PASAPORTE</option>
</select>
<label for="documentoid"></label>
<input type="text" name="documentoid" id="documentoid" /></td>
</tr>
<tr>
<td align="right" valign="middle">Sexo</td>
<td><p>
<label>
<input type="radio" name="Sexo" value="M" id="Sexo_0" />
Masculino</label>
<br />
<label>
<input type="radio" name="Sexo" value="F" id="Sexo_1" />
Femenino</label>
<br />
</p></td>
</tr>
<tr>
<td align="right" valign="top"><label for="fechanac">Fecha de Nacimiento</label></td>
<td><input name="fechanac" type="text" id="fechanac" value="dd/mm/aa" /></td>
</tr>
<tr>
<td align="right" valign="top"><label for="celular">Celular</label></td>
<td><input type="text" name="celular" id="celular" /></td>
</tr>
<tr>
<td align="right" valign="top"><label for="email">Email</label></td>
<td><input type="text" name="email" id="email" /></td>
</tr>
<tr>
<td align="right" valign="top"><label for="Direccion">Dirección</label></td>
<td><input type="text" name="Direccion" id="Direccion" /></td>
</tr>
<tr>
<td align="right" valign="top"><label for="departamento">Departamento</label></td>
<td><input type="text" name="departamento" id="departamento" /></td>
</tr>
<tr>
<td align="right" valign="top"><label for="provincia">Provincia</label></td>
<td><input type="text" name="provincia" id="provincia" /></td>
</tr>
<tr>
<td align="right" valign="top"><label for="distrito">Distrito</label></td>
<td><input type="text" name="distrito" id="distrito" /></td>
</tr>
<tr>
<td align="right" valign="top"><label for="consulta">Consulta</label></td>
<td><textarea name="consulta" id="consulta" cols="45" rows="5">
</textarea></td>
</tr>
<tr>
<td align="right" valign="top">&nbsp;</td>
<td><label>
<input name="info" type="checkbox" id="info" value="yes" />
Deseo recibir información </label></td>
</tr>
<tr>
<td align="right" valign="top">&nbsp;</td>
<td><input type="reset" name="Limpiar" id="Limpiar" value="Limpiar " /> <input type="submit" name="Enviar" id="Enviar" value="Enviar" /></td>
</tr>
</table>
</form>
</body>
</html>

y el de mi php:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>

<body>
<?PHP;

$sendTo = "*****@gmail.com";
$subject = "Interesados por ******";

if (isset($_POST['enviar'])

$_POST['nombreinteresado'] . "<BR>n";


echo "Su Apellido paterno es <b>" .$_POST['apellidopat'] . "<BR>n";


echo "Su Apellido materno es <b>" .$_POST['apellidomat'] . "<BR>n";

echo "Su documento de identidad es " . $_POST['documentoid'] . "<BR>n";

echo "Es " . $_POST['sexo'] . "<BR>n";

echo "Nacio " . $_POST['fechanac'] . "<BR>n";

echo "Su número de celular es " . $_POST['celular'] . "<BR>n";

echo "Su correo es " . $_POST['email'] . "<BR>n";

echo "Su direccion es " . $_POST['Direccion'] . "<BR>n";

echo "Vive en el departamento de " . $_POST['departamento'] . "<BR>n";

echo "Provincia de " . $_POST['provincia'] . "<BR>n";

echo "En el distrito de " . $_POST['distrito'] . "<BR>n";

if ($_POST['consulta'] != "") {

echo "Sus consultas son: <BR>n";

echo nl2br($_POST['consulta']);

} else {

echo "No tiene consultas <BR>n";

if (isset($_POST['info']) {

echo "Desea información de la escuela <BR>n";

} else odigo" style="margin-left: 50">} else {

echo "No desea información de la escuela <BR>n";



}

echo "<a href='form01.html'>VOLVER AL FORMULARIO</a>"

?>

</body>
</html>

me bota el sgte error: uexpected t variable

q puedo hacer?
donde estoy fallando