Ver Mensaje Individual
  #7 (permalink)  
Antiguo 25/10/2011, 16:46
Avatar de zreep
zreep
 
Fecha de Ingreso: octubre-2009
Ubicación: Argentina
Mensajes: 534
Antigüedad: 14 años, 6 meses
Puntos: 12
Respuesta: duda con isset

andresdzphp, gracias pero sigue sin funcionar...

este es el archivo from_alta.php

Código HTML:
<form action="alta.php" method="post">
<input type="hidden" name="nombre" value="<?php echo $_SESSION['nombre'];?>">
<input type="text" name="titulo"><br><br>
<textarea id="id2" class="nbtn" name="notta"></textarea>
<br><br>
<input  type="submit" name="enviar" value="Compartir">
<input type="reset" value="Limpiar">
</form><br> 
y este es el alta.php

Código PHP:

$nombre      
$_POST['nombre'];
$title              $_POST['titulo'];

$des             $_POST['notta'];

$dia             date("d");

$mes           date("M");

$anio          date("Y");

$hora          date("H:s");

if (isset(
$_POST["enviar"])) {
$alta "INSERT into notas (nombre, titulo, notta, hora, dia, mes, anio) VALUES ('$nombre','$title','$des','$hora','$dia','$mes','$anio')";
mysql_query($alta) or die(mysql_error());
header("refresh:0; url=home.php");
} else {
echo 
"Uno de los campos esta vacío.";