Vamos a empezar un nuevo tutorial en este año 2014 bastante mas avanzado que los dos cursos de iniciación anteriores creados en el canal Zeuskx Desarrollo Web PHP.



Estos son los códigos básicos para empezar con el curso para facilitar el desarrollo, los editores de código que recomiendo son:

Sublime text
Dreamweaver
Notepad++ (Gratuito)
Brackets (Gratuito)

Empezar el curso en youtube
Demo: https://www.youtube.com/watch?v=hrWTk94FzVk&list=PLn6DZNSAhHfsOR5FRPvpk1yzdhX7NGyCH

Todos los enlaces:
Archivos del proyecto: https://www.dropbox.com/s/8q1gaxzy9hh9hid/cap14.rar
Xampp: https://phpres.net/servidores/descargar-servidor-apache-gratuito-xampp
Códigos de ejemplo en mysqli: Descargar archivo

Ver el curso completo

Importante!! Los versión de php de los códigos de ejemplo ha sido actualizada a mysqli, para cualquier problema comentar en este hilo ;)

PHP
<?php
//FORMATEO BASE DE DATOS
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
  //Iniciamos la variable $conexion
  global $conexion;

  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  //Agregamos $conexion en las funciones mysqli_real_escape_string y mysqli_escape_string
  $theValue = function_exists("mysqli_real_escape_string") ? mysqli_real_escape_string($conexion,$theValue) : mysqli_escape_string($conexion,$theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}

//FORMATO DE CARACTERES
    header('Content-Type: text/html; charset=iso-8859-1');

//CONSULTA BASE DATOS
    mysqli_select_db($conexion, $database_conexion);
    $query_DatosWeb = "SELECT * FROM tabla WHERE columna";
    $DatosWeb = mysqli_query($conexion, $query_DatosWeb) or die(mysqli_error());
    $row_DatosWeb = mysqli_fetch_assoc($DatosWeb);
    $totalRows_DatosWeb = mysqli_num_rows($DatosWeb);
    
    mysqli_free_result($DatosWeb);

//ACTUALIZACION BASE DATOS
     $updateSQL = sprintf("UPDATE tabla SET columna",
                       GetSQLValueString($idautor, "int"));
     mysqli_select_db($conexion, $database_conexion);
     $Result1 = mysqli_query($conexion, $updateSQL) or die(mysqli_error());
     
//BORRADO BASE DATOS
    $deleteSQL = sprintf("DELETE FROM tabla WHERE columna",
                               GetSQLValueString($limite, "int"));
        
    mysqli_select_db($conexion, $database_conexion);
    $Result1 = mysqli_query($conexion, $deleteSQL) or die(mysqli_error());
    
//CERRAR SESION
if ((isset($_GET['cerrar'])) &&($_GET['cerrar']=="yes")){
      //to fully log out a visitor we need to clear the session varialbles
      $_SESSION['iduser'] = NULL;
      $_SESSION['nombreuser'] = NULL;
      unset($_SESSION['iduser']);
      unset($_SESSION['nombreuser']);
    
        
      $logoutGoTo = $dato['0'];
      
       header("Location: $logoutGoTo");
       exit;
 
}

//CONEXION BASE DATOS
    require_once('');
    
    $hostname_conexion = "localhost";
    $database_conexion = "DB";
    $username_conexion = "root";
    $password_conexion = "";
    $conexion = mysqli_connect($hostname_db, $username_db, $password_db);
    
//SESSIONES
if (!isset($_SESSION)) {
  session_start();
}


//setear cookie 1 mes
setcookie("galleta", $_POST['aceptar'], time() + (30 * 24 * 60 * 60),"/");


//Insertar registro
$insertSQL = sprintf("INSERT INTO tabla (colum1, colum2) VALUES (%s, %s)",
                       GetSQLValueString($_SESSION['nombreuser'], "text"),
                       GetSQLValueString($_POST['mensajes'], "text"));

  mysqli_select_db($conexion, $database_conexion);
  $Result1 = mysqli_query($conexion, $insertSQL) or die(mysqli_error());

//Subir imagen
$nombre_imagen = rand().$_FILES['imagen1']['name'];
    move_uploaded_file($_FILES['imagen1']['tmp_name'], "../directorio/".$nombre_imagen);

//Función php
function datos ($id)
{

    global $database_conexion, $conexion;
    //Codigo
}

//Buscador
    mysqli_select_db($conexion, $database_conexion);
    $query_SacarPost = sprintf("SELECT * FROM z_posts WHERE titulo LIKE %s", GetSQLValueString("%" . $cadena . "%", "text"));
    $SacarPost = mysqli_query($conexion, $query_SacarPost) or die(mysqli_error());
    $row_SacarPost = mysqli_fetch_assoc($SacarPost);
    $totalRows_SacarPost = mysqli_num_rows($SacarPost);

   mysqli_free_result($SacarPost);
?>
JS Y JQUERY
//FUNCION AJAX		
		$.ajax({
		type: 'POST',
		url: urlWeb + 'inc/recuperar.php',
		data: 'email=' + emailajax,
		success: function(html) {
	   }
	});
	
//CAMBIAR DISPLAY
       $('#error_login').css("display","none");
	   
//RETRASAR ACCION
        setTimeout(function(){
		},1000);

//IMPRIMIR HTML
        $('#resultados').html(html);
		
//DESACTIVAR BOTON
        document.getElementById('mi_btn').disabled=false;
		
//ACTUALIZAR CKEDITOR
    for (instance in CKEDITOR.instances) {
                CKEDITOR.instances.mensajes.updateElement();
            }
			
//ELIMINAR CARACTERES
         conteotitulo = titulo.split(" ").join("");
		 
//CONFIRMACION
function confirmacion(valor){
	if (valor==1){
     return confirm('Banear al user?');
    }

}

//Checkbox
if($("#checar").is(':checked')) {  
		recordar='on';
		} else {
		recordar='off';	
		}
//Ejecutar función al hacer clic
$("body,html").click(function(){
    alert('ejecucion');
});
hablamos en próximos vídeos ;)
Editado
53
Puntos
18578
Visitas
13
Resp
Por zeuskx hace 11 años
Mods
Respuesta #1
muy buena noticia zeus! esperamos con ansia
0
Puntos
Por alber hace 11 años
Admin
Respuesta #2
Muy Buen aporte Zeus! (:
0
Puntos
Por fc2014 hace 11 años
Master
Respuesta #3
Estoy esperando tu nuevo curso, muchas gracias por avisar y espero tu curso nuevo.
10
Puntos
Por bsl hace 11 años
Novice
Respuesta #4
Hola quería saber cuando va salir el curso mas o menos?
0
Puntos
Por bsl hace 11 años
Novice
Respuesta #5
estaria bueno que hicieras un curso de como hacer algo parecido a mercadolibre o ebay, tus cursos estan geniales gracias!!
0
Puntos
Por fernandoury hace 11 años
Novice
Respuesta #6
Genial zeuskx, estaré pendiente del canal :P
1
Puntos
Por jose hace 11 años
Master
Respuesta #7
Genial!!!ya tenia ganas de que volvieses a hacer otro tutorial.
5
Puntos
Por irmerov hace 11 años
Novice
Respuesta #8
Epale Rafa, tiempo sin verte por el foro. El curso ya está en Youtube hasta el capítulo 13.
#EsperandoPorMas
5
Puntos
Por jose hace 11 años
Master
Respuesta #9
agradecido por tu aporte, esperando por los demas videos, llegue por casualidad por el curso anterior de php y me encontre con este otro que es más avanzado
1
Puntos
Por dogdark hace 11 años
Novice
Respuesta #10
Hola¡ este curso es gratis? y si se pueden descargar los códigos.
1
Puntos
Por fidel hace 10 años
Novice
Respuesta #11
muy buen curso varias cosas he podido hacer con los tutoriales
1
Puntos
Por jorgemoralesmv hace 7 años
Novice
Respuesta #12
Recomendado 100% -
Está muy bien explicado, muy completo e impartido por expertos...
Contentísimo de haber llegado aquí.

Si estas revisando los comentarios del curso antes de colaborar y hacerlo completo te sugiero lo siguiente:

DEJA DE DUDAR Y COLABORA. Te aseguro que superará tus expectativas y estas en el momento justo y lugar correcto.

2
Puntos
Por tib hace 7 años
Novice
Respuesta #13
tengo una web de kinesiologas lima el problema es que al darle mostrar mas las ads se duplican no entiendo que se a echo mal dejo la web aqui para que pruven y me digan donde fallo https://luxarymodels.com/
0
Puntos
Por scanor1207 hace 3 años
Novice
Para comentar Inicia sesión o Regístrate
Phpres 2025@ All rights reserved.
Utilizamos cookies para mejorar la navegación en el sitio. Más información Aceptar