11.09.2018 Views

Aprender a desarrollar un sitio Web con PHP y MySQL

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Solución<br />

Cree <strong>un</strong>a carpeta de imágenes en el mismo lugar que sus php.<br />

Cree la base de datos Blog.<br />

El script SQL para crear el <strong>con</strong>tenido de la tabla es:<br />

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";<br />

DROP TABLE IF EXISTS <strong>con</strong>tenido;<br />

CREATE TABLE <strong>con</strong>tenido (<br />

Id int(11) NOT NULL AUTO_INCREMENT,<br />

Titulo varchar(25) NOT NULL,<br />

Fecha Datetime NOT NULL,<br />

Comentario text NOT NULL,<br />

Imagen varchar(25) NOT NULL,<br />

PRIMARY KEY (Id)<br />

) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;<br />

La página del formulario_añadir.php es:<br />

<br />

<br />

<br />

Blog<br />

<br />

<br />

<br />

Formulario para añadir el <strong>con</strong>tenido al Blog<br />

<br />

www.FreeLibros.me

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!