Ver Mensaje Individual
  #1 (permalink)  
Antiguo 16/11/2010, 17:25
martines
 
Fecha de Ingreso: abril-2010
Mensajes: 76
Antigüedad: 14 años
Puntos: 0
No me encuentra el archivo

Buenas, tengo estos dos archivos, cuando envio el fomulario al archivo recogida me dice que no me encuentra el archivo, los dos archivos estan a la misma carpeta.


Código PHP:
<div style="width:100%;">
<
form style="margin:0px; padding:0px;" id="formreg" name="formreg" method="post" action="recogida.php">
<
strong>Empresa</strong>: <br/>
<
input name="empresa" id="empresa" type="text" style="width:100%;"/><br/>
</
div>
<
div style="float:left; width:60%;">
<
strong>Actividad</strong>:<br/>
<
input name="actividad" id="actividad" type="text" style="width:90%;"/><br/>
</
div>
<
div style="float:left; width:40%;">
<
strong>Grupo</strong>: <br/>
<
select name="grupo" id="grupo" style="width:100%;">
<
option value="Elija una opci&oacute;n" selected="selected">Elija una opci&oacute;n</option>
  <
option value="Instalador">Instalador</option>
  <
option value="Punto de Venta">Punto de Venta</option>
  <
option value="Constructora">Constructora</option>
  <
option value="Precripci&oacute;n">Precripci&oacute;n</option>
</
select><br />
</
div>
<
div style="clear:both"></div>
<
div style="float:left; width:60%;">
<
strong>País</strong>: <br/>
<
input name="pais" id="pais" type="text" style="width:90%;"/><br/>
</
div>
<
div style="float:left; width:40%;">
<
strong>Localidad</strong>: <br/>
<
input name="loc" id="loc" type="text" style="width:100%;"/><br/>
</
div>
<
div style="clear:both"></div>
<
div style="float:left; width:60%;">
<
strong>Correo electronico</strong>:<br/>
<
input name="emilio" id="emilio" type="text" style="width:90%;"/>
<
input name="email" id="email" type="hidden"/><br/>
</
div>
<
div style="float:left; width:40%;">
<
strong>Web</strong>: <br/>
<
input name="web" id="web" type="text" style="width:100%;"/><br/>
</
div>
<
div style="clear:both"></div>
<
div style="float:left; width:60%;">
<
strong>Contacto</strong>: <br/>
<
input name="contacto" id="contacto" type="text" style="width:90%;"/><br/>
</
div>
<
div style="float:left; width:40%;">
<
strong>Teléfono</strong>: <br/>
<
input name="telf" id="telf" type="text" style="width:100%;"/><br/>
</
div>
<
div style="clear:both"></div>
<
input onMouseUp="validaringresar()" class="submit" name="submit" id="submit" type="submit" value="Enviar" style=" font-size:14px; background-color:#7ddbff; color:#000;" />

</
p>
   
    
 
  </
form>
  </
div
Este archivo tendria que ingresarme los datos a la bd, pero cuando le doy a enviar al formulario y antes de ingredar los datos me dice que no lo encuentra

Código PHP:
<?php

    
// Primero comprobamos que ningún campo esté vacío y que todos los campos existan.
    
if(isset($_POST['empresa']) && !empty($_POST['empresa']) &&
    isset(
$_POST['actividad']) && !empty($_POST['actividad']) &&
     isset(
$_POST['grupo']) && !empty($_POST['grupo']) &&    
     isset(
$_POST['telf']) && !empty($_POST['telf']) &&  
     isset(
$_POST['loc']) && !empty($_POST['loc']) &&  
     isset(
$_POST['demail']) && !empty($_POST['demail']) &&  
     isset(
$_POST['pais']) && !empty($_POST['pais']) &&  
     isset(
$_POST['web']) && !empty($_POST['web']) &&  
     isset(
$_POST['contacto']) && !empty($_POST['contacto'])) {

        
// Si entramos es que todo se ha realizado correctamente

        
$link mysql_connect("localhost","root","");
        
mysql_select_db("fronsventilo",$link);

        
// Con esta sentencia SQL insertaremos los datos en la base de datos
        
mysql_query("INSERT INTO informacion (empresa,avtividad,grupo,telf,loc,demail,pais,web,contacto)
        VALUES ('{$_POST['empresa']}','{$_POST['actividad']}','{$_POST['grupo']}','{$_POST['telf']}','{$_POST['loc']}','{$_POST['demail']}','{$_POST['pais']}','{$_POST['web']}','{$_POST['contacto']}')"
,$link);

        
// Ahora comprobaremos que todo ha ido correctamente
        
$my_error mysql_error($link);

        if(!empty(
$my_error) {

            echo 
"Ha habido un error al insertar los valores. $my_error"

        } else {

            echo 
"Los datos han sido introducidos satisfactoriamente";

        }

    } else {

        echo 
"Error, no ha introducido todos los datos";

    }

?>