r4gn0
05-15-2008, 06:16 PM
Hi!! im trying to do an INSERT INTO a table called "orden" the variables are taken from the session and then inserted to de db...thats what i tought :D
IT DOESNT INSERT ANYTHING!!!!! :mad:
What is wrong with this? it tried echoing the variables and it did it...so..the variables are fine...but i cant insert the data to the db...help PLZ!!!!
session_start();
require_once('Connections/principal.php');
$miconexion = new Db("aratel","localhost","aratel","arapass");
$do=$_SESSION['ndo_form'];
$fecha = date("d-M-y");
$num_orden="123456";
$cuidad="Cartagena";
$modalidad=$_SESSION['modalidad_form'];
$cliente=$_SESSION['empresa'];
$subcliente=$_SESSION["subcliente_form"];
$pedido=$_SESSION['numped_form'];
$num_serv=$_SESSION['nserv_form'];
$peso=$_SESSION['peso_form'];
$zona_opera=$_SESSION['operacion_form'];
$ubicacion=$_SESSION['ubicacion_form'];
$orden = $miconexion->consulta("INSERT INTO orden ('do','fecha','num_orden','ciudad','modalidad','cliente','subcliente','pedido','num_serv','peso','zo na_opera','ubicacion') VALUES ('".$do."','".$fecha."','".$num_orden."','".$ciudad."','".$modalidad."','".$cliente."','".$subcliente."','".$pedido."','".$num_serv."','".$peso."','".$zona_opera."','".$ubicacion."')");
IT DOESNT INSERT ANYTHING!!!!! :mad:
What is wrong with this? it tried echoing the variables and it did it...so..the variables are fine...but i cant insert the data to the db...help PLZ!!!!
session_start();
require_once('Connections/principal.php');
$miconexion = new Db("aratel","localhost","aratel","arapass");
$do=$_SESSION['ndo_form'];
$fecha = date("d-M-y");
$num_orden="123456";
$cuidad="Cartagena";
$modalidad=$_SESSION['modalidad_form'];
$cliente=$_SESSION['empresa'];
$subcliente=$_SESSION["subcliente_form"];
$pedido=$_SESSION['numped_form'];
$num_serv=$_SESSION['nserv_form'];
$peso=$_SESSION['peso_form'];
$zona_opera=$_SESSION['operacion_form'];
$ubicacion=$_SESSION['ubicacion_form'];
$orden = $miconexion->consulta("INSERT INTO orden ('do','fecha','num_orden','ciudad','modalidad','cliente','subcliente','pedido','num_serv','peso','zo na_opera','ubicacion') VALUES ('".$do."','".$fecha."','".$num_orden."','".$ciudad."','".$modalidad."','".$cliente."','".$subcliente."','".$pedido."','".$num_serv."','".$peso."','".$zona_opera."','".$ubicacion."')");