Ver Mensaje Individual
  #9 (permalink)  
Antiguo 15/01/2013, 10:08
yolanda16568
 
Fecha de Ingreso: agosto-2011
Mensajes: 165
Antigüedad: 12 años, 9 meses
Puntos: 1
Respuesta: Problemas de variable

if($nombre == "" || $email == "" || $comentario == ""){

error linea 155 es la de arriba se me quitan los demas errores
quedaria asi:




Código PHP:
   <form action="process.php" method="post">
                                  </form>
      <form action="process.php" method="post" name="form1" id="form1">
        <table width="517" align="center">
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">Nombre:</td>
            <td><input type="text" name="nombre" value="" size="32" /></td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">Email:</td>
            <td><input type="text" name="email" value="" size="32" /></td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">Direccion:</td>
            <td><input type="text" name="direccion" value="" size="32" /></td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">Localidad:</td>
            <td><input type="text" name="localidad" value="" size="32" /></td>
          </tr>
          <tr valign="baseline">
            <td align="right" valign="top" nowrap="nowrap">Comentario:</td>
            <td><textarea name="comentario" cols="50" rows="6"></textarea></td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">&nbsp;</td>
            <td><input name="submit" type="submit" id="submit" value="Insertar registro" />
            <input name="reset" type="reset" value='Borrar todo' /></td>
          </tr>
        </table>
        <input type="hidden" name="MM_insert" value="form1" />
      </form>
      <?php
       
if (isset($_POST['submit']))
{
$recipiente "[email protected]"
$asunto "Comentario del Sitio"
$error 0
$nombre $_POST['nombre']; 
$email $_POST['email']; 
$direccion $_POST['direccion']; 
$localidad $_POST['localidad']; 
$comentario $_POST['comentario'];
if(
$nombre == "" ||  $email == "" || $comentario == ""){
   
$error=1;
}