This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Estas son las sentencias básicaS para manejar MySQL con PHP. | |
// Estos son los datos de conexión | |
$dbhost = 'localhost'; // Servidor de la BD | |
$dbuser = 'root'; // Usuario | |
$dbpass = 'password'; // Password | |
$dbname = 'somedatabase'; // Base de datos | |
// Conexión |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* SCRIPT PARA ENVIAR CORREOS DESDE PHP | |
* | |
* Script sencillo para enviar datos de un formulario | |
* por correo mediante MAIL de PHP | |
* | |
* @author: Fernando Magrosoto V | |
* @copyright: Febrero 2000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
#### | |
## Eliminar una imagen | |
#### | |
if(isset($_GET['eliminar'])){ | |
$archivo = $_GET['eliminar']; | |
$directorio = dirname(__FILE__); | |
if(unlink($directorio.'/'.$archivo)){ | |
header("Location: cargarImagen.php?accion=eliminado"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
############################################################################# | |
## Función para comparar fechas extraídas | |
## de un sql query. | |
## Lo que hace la función es convertir | |
## las fechas gregorianas en fechas julianas | |
## y calcular los días de diferencia | |
## | |
## Créditos: http://www.webtutoriales.com/articulos/comparar-fechas-en-php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// JavaScript Document | |
// Inicialización de AJAX multiplataforma | |
// Otra alternativa para instanciar el objeto. | |
// Sólo es necesario crear un nuevo objeto con el nombre de la instancia | |
// ej: XMLHttp = crearInstancia(); | |
function crearInstancia() { | |
XMLHttp = false; |
NewerOlder