🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: chile.comp.programacion
Article #1280

Ayuda con este codigo php-mysql

#1280
From: chucky
Date: Thu, 26 Oct 2006 05:25
39 lines
2343 bytes
Hola me podrian decir que esta mal en este pedazo de codigo? La funcion
sobreescribir fichero es para cargar de nuevo un php anterior. No me
carga nada a la base de datos. Desde ya muchas gracias


<?php
   $nombre=$_POST['nombre'];
   $apellido=$_POST['apellido'];
   $nick=$_POST['nick'];
   $pass=$_POST['pass1'];
   $pais=$_POST['pais'];
   $alt_mail=$_POST['alt_mail'];
   $preg_sec=$_POST['preg_seg'];
   $resp_sec=$_POST['resp_sec'];
   $enlace = mysql_connect('localhost', 'root', '') or die('No pudo
conectarse : ' .mysql_error());
   mysql_select_db('Correo') or die('No pudo seleccionarse la BD.');
   echo"Nombre $nombre";
   $consulta="insert into usuarios
values('','$nombre',$apellido,'a','$nick','$pass','$pais',
   '$alt_mail','$preg_sec','.$resp_sec.')";
   mysql_query($consulta) or die(reescribirFichero("Login.php"));
   mysql_query("Commit");
   reescribirFichero("Registrar.php");


   /////////////////  funciones ///////////////
   function reescribirFichero($archivo){
	  $gestor = @fopen($archivo, "r");

 	  if($gestor){
         while (!feof($gestor)) {
            $bufer = fgets($gestor, 4096);
            echo $bufer;
         }
          fclose ($gestor);
      }
   }	     
?>
Technical Details
Message-ID: <1161840340.357567.308510@f16g2000cwb.googlegroups.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!f16g2000cwb.googlegroups.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 1593cb,6ac38f3e258264a0,start
X-Google-Attributes: gid1593cb,public
X-Google-Language: SPANISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!f16g2000cwb.googlegroups.com!not-for-mail
From: "chucky" <bordonfederico@gmail.com>
Newsgroups: chile.comp.programacion
Subject: Ayuda con este codigo php-mysql
Date: 25 Oct 2006 22:25:40 -0700
Organization: http://groups.google.com
Lines: 40
Message-ID: <1161840340.357567.308510@f16g2000cwb.googlegroups.com>
NNTP-Posting-Host: 190.52.140.28
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1161840345 19915 127.0.0.1 (26 Oct 2006 05:25:45 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 26 Oct 2006 05:25:45 +0000 (UTC)
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: f16g2000cwb.googlegroups.com; posting-host=190.52.140.28;
   posting-account=wSaaOg0AAAAuHJHjChRtJfsoxgnatU1F