Ver Mensaje Individual
  #12 (permalink)  
Antiguo 22/07/2011, 15:30
Avatar de DinamiteDog
DinamiteDog
 
Fecha de Ingreso: febrero-2005
Ubicación: Rosario, Argentina
Mensajes: 77
Antigüedad: 19 años, 2 meses
Puntos: 4
Respuesta: no jme escribe en la BD

Pone esto.. te va a andar, y sobre todo chequea siempre que hayas puesto bien los paréntesis y comillas:

Código PHP:
Ver original
  1. <?php
  2. $connect=mysql_connect("xxx","xxx","xx");
  3. mysql_select_db("db375118189",$connect);
  4. $titulo=$_POST[titulo];
  5. $autor=$_POST[autor];
  6. $categoria=$_POST[categoria];
  7. $articulo=$_POST[articulo];
  8. $sql = "INSERT INTO noticias VALUES('$titulo','$autor','$categoria','$articulo' ,NOW())";
  9.  
  10. mysql_query($sql, $connect) or die("Tuve un error en: " . mysql_error() . "<br />Con la consulta: " . $sql);
  11.  
  12. ?>
__________________
All generalizations are false, including this one ~ Mark Twain