function traerInformacion1($sql) { $cn = new coneccion(); if (!($datos = mysql_query($sql, $cn->Conectarse()))) { throw new Exception(mysql_error()); } return $datos; }
<?php $com = $_POST['ComentarioFoto']; $id = $_POST['post']; require "conexion.php"; $conn = new coneccion(); $conn->get_conectar(); $sql = "INSERT INTO comentarios VALUES ('','{$com}','','{$id}')"; $conn->bd($sql); mysqli_query($conn, $sql); header("Location: index.php?n={$id}");
<?php include './DAOAdministracion/DAOCategorias.php'; include './conexion.php'; $cn = new coneccion(); $cn->Conectarse(); $daoCategoria = new DAOCategorias(); $rs = $daoCategoria->guardarCategoria($_GET["categoria"]); if ($rs == false) { echo mysql_error(); } else { echo 'Nueva Categoria Disponible'; }
<?php include "coneccion.php"; $tag = $_POST['tag']; $nombre = $_POST['nombre']; $pass = $_POST['pass']; if (isset($tag) && $tag !== '') { if ($tag == 'login') { $conn = new coneccion(); $conn->get_conectar(); $sql = "INSERT INTO registro VALUES ('','{$nombre}','{$pass}')"; $conn->bd($sql); echo true; } }
<?php require "coneccion.php"; require "coneccion_bd.php"; require "sessiones.php"; require "log.php"; require "inserts.php"; $con = new coneccion(); $bd = new bd(); $con->get_conection(); $log = new loguin(); $log->loguin(); $mensaje = new mensaje(); $mensaje->mensaje(); $mensaje->foto(); // $sql="INSERT INTO post VALUES('','$user') "; // $fila=$bd->insert($sql);