<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Sitio Sector Web</title>
	<atom:link href="http://www.sectorweb.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sectorweb.net</link>
	<description>En este sitio podras encontrar distintos tutoriales, recursos, notas, curiosidades etc etc del mundo del desarrolllo y diseño web</description>
	<pubDate>Wed, 17 Mar 2010 15:04:09 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>De vuelta con nuevas aventuras</title>
		<link>http://www.sectorweb.net/2010/03/17/de-vuelta-con-nuevas-aventuras/</link>
		<comments>http://www.sectorweb.net/2010/03/17/de-vuelta-con-nuevas-aventuras/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 05:16:41 +0000</pubDate>
		<dc:creator>Rodrigo-Λzul</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.sectorweb.net/?p=82</guid>
		<description><![CDATA[
Hola a todos!!! vaya que ha pasado mucho tiempo que no escribo en el blog!!! muchas gracias a los que siguen entrando. Le dare un giro completo al blog asi que no se sorprendan, contare algunas experiencias como emprendedor, seguire compartiendo el conocimiento que he adquirido, contare unas anécdotas, mis puntos de vista, en fin [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" style="float: left;" src="/images/panda.jpg" alt="" /></p>
<p>Hola a todos!!! vaya que ha pasado mucho tiempo que no escribo en el blog!!! muchas gracias a los que siguen entrando. Le dare un giro completo al blog asi que no se sorprendan, contare algunas experiencias como emprendedor, seguire compartiendo el conocimiento que he adquirido, contare unas anécdotas, mis puntos de vista, en fin muchas cosas que pasan en mi camino tecnológico.</p>
<p>Entre mis mejores noticias es que este año terminare la universidad pffff fue una pesadilla sin duda la peor, egresado con un promedio general de<strong> 6.3</strong> de la carrera en Ing. en Computación&#8230; Sali  con honores de la Universidad de <strong>Google</strong> y claro fue un orgullo nacer y crecer con la Internet, pero bueno en otro post me gustaría platicar de esto y de todo lo que pienso con los modelos de estudio actuales&#8230;</p>
<p>Una disculpa por haber bajado el foro como se dieron cuenta fue espameado asi que solo espero a que termine de subir VBulletin para levantar el Backup y ponerlo de nuevo en marcha!</p>
<p>Siento no contestar los correos de ayuda,  me lleva mucho tiempo resolver las dudas y no siempre puedo resolverlas :P, mi unica  recomendacion para aquellos que tienen problemas es:</p>
<p><strong>1)</strong> Busquen en google, este blog es solo un recurso mas a su disposición.<br />
Y bueno el Post aun no deja nada productivo jeje asi que los invito a que asistan al <strong>FliSoL 2010</strong> el cual se realiza en diversas ciudades de latinoamerica, asistan y conozcan mas el software libre, para mas informacón y sedes visiten la pagina oficial  aqui tienen el enlace !!!</p>
<p style="text-align: center;"><a href="http://flisol.net/" target="_blank"><img style="border: 0pt none;" src="http://sectorweb.net/imagenes/visitar.jpg" alt="" width="188" height="57" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sectorweb.net/2010/03/17/de-vuelta-con-nuevas-aventuras/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Invitacion al FLISoL 2009</title>
		<link>http://www.sectorweb.net/2009/04/08/invitacion-al-flisol-2009/</link>
		<comments>http://www.sectorweb.net/2009/04/08/invitacion-al-flisol-2009/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 22:34:12 +0000</pubDate>
		<dc:creator>Rodrigo-Λzul</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.sectorweb.net/?p=79</guid>
		<description><![CDATA[
Hola a todos!!! Antes que nada agradezco al Equipo Xombra por haber mejorado el codigo del tutorial de &#8220;Sistema de Usuarios con PHP y MySQL&#8221;  . Al grano! les traigo una invitación al Festival Latinoamericano de Instalacion de Software Libre el cual se celebrara simultanea mente en distintas sedes en toda Latinoamerica, la fecha [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.sectorweb.net/2009/04/08/invitacion-al-flisol-2009/"><img class="aligncenter" src="http://www.sectorweb.net/imagenes/principalFlisol.jpg" border="0" alt="" /></a></p>
<p>Hola a todos!!! Antes que nada <a href="http://www.xombra.com/" target="_self"><strong>agradezco al Equipo Xombra </strong></a>por haber mejorado el codigo del tutorial de &#8220;Sistema de Usuarios con PHP y MySQL&#8221; <img src='http://www.sectorweb.net/wp-includes/images/smilies/coo.gif' alt='(Y)' class='wp-smiley' /> . Al grano! les traigo una invitación al Festival Latinoamericano de Instalacion de Software Libre el cual se celebrara simultanea mente en distintas sedes en toda Latinoamerica, la fecha es el <strong>Sabado 25 de Abril en la ESIME Culhuacan</strong> apartir de las 9:00 am, la direccion es: Av.Santa Ana No. 1000, Col. San Francisco Culhuacan, Del. Coyoacan, <strong>México D.F.</strong> Habra instalaciones, talleres, y conferencias!! estare dando por ahi una ponencia de &#8220;¿Por que usar Software Libre?&#8221; para mas información y registro visiten el siguiente link, espero verlos por alla!!</p>
<p style="text-align: center;"><a href="http://flisol.sectorweb.net" target="_blank"><img class="aligncenter" style="border: 0pt none;" src="http://sectorweb.net/imagenes/visitar.jpg" alt="" width="188" height="57" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sectorweb.net/2009/04/08/invitacion-al-flisol-2009/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Slide:Ology RapidShare El arte y la ciencia de la creación de una gran presentación</title>
		<link>http://www.sectorweb.net/2008/11/30/slideology-rapidshare-el-arte-y-la-ciencia-de-la-creacion-de-una-gran-presentacion/</link>
		<comments>http://www.sectorweb.net/2008/11/30/slideology-rapidshare-el-arte-y-la-ciencia-de-la-creacion-de-una-gran-presentacion/#comments</comments>
		<pubDate>Sun, 30 Nov 2008 07:25:16 +0000</pubDate>
		<dc:creator>Rodrigo-Λzul</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.sectorweb.net/?p=77</guid>
		<description><![CDATA[
Saludos mis queridos amigos, les he conseguido este maravilloso libro donde aprenderan a hacer sus slides de ponencias o exposiciones como verdaderos profesionales, para que ya no aburran a su auditorio como lo hacen todos mis profesores y para que capten todos el mensaje que desean transmitir!! en verdad me gustaria compartirlo, no es que [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.sectorweb.net/2008/11/30/slideology-rapidshare-el-arte-y-la-ciencia-de-la-creacion-de-una-gran-presentacion/#subir" target="_self"><img class="aligncenter" style="border: 0pt none;" src="http://www.sectorweb.net/images/slide_ology.jpg" alt="" width="300" height="301" /></a></p>
<p>Saludos mis queridos amigos, les he conseguido este maravilloso libro donde aprenderan a hacer sus slides de ponencias o exposiciones como verdaderos profesionales, para que ya no aburran a su auditorio como lo hacen todos mis profesores y para que capten todos el mensaje que desean transmitir!! en verdad me gustaria compartirlo, no es que este muy caro lo que me molesta es el afan de lucrarse con el conocimiento!!! y de no compartirlo con la gente que no tiene el suficiente dinero y que tiene muchas ganas de aprender, bueno pandilla hay les dejo el link!! Que lo disfruten!!! <strong>viene en Ingles!.<br />
</strong></p>
<p style="text-align: center;"><a href="http://rapidshare.com/files/364407922/slideology.pdf" target="_blank"><img style="border: 0pt none;" src="http://sectorweb.net/imagenes/visitar.jpg" alt="" width="188" height="57" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sectorweb.net/2008/11/30/slideology-rapidshare-el-arte-y-la-ciencia-de-la-creacion-de-una-gran-presentacion/feed/</wfw:commentRss>
		</item>
		<item>
		<title>No estoy muerto, solo estoy ocupado</title>
		<link>http://www.sectorweb.net/2008/10/11/no-estoy-muerto-solo-estoy-ocupado/</link>
		<comments>http://www.sectorweb.net/2008/10/11/no-estoy-muerto-solo-estoy-ocupado/#comments</comments>
		<pubDate>Sat, 11 Oct 2008 18:22:30 +0000</pubDate>
		<dc:creator>Rodrigo-Λzul</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.sectorweb.net/?p=76</guid>
		<description><![CDATA[No estoy muerto, solo estoy ocupadoProximamente Tutos de: JAVA, WebObjects, ActionScript Avanzado, Prototypes con Scrptaculous, y dos tres cosas que he aprendido pero no he tenido mucho tiempo para compartir, les mando un gran saludo y muy buena vibra a todos, hasta pronto.
]]></description>
			<content:encoded><![CDATA[<p>No estoy muerto, solo estoy ocupado<img style="border: 0pt none;" src="http://sectorweb.net/images/Bernie.png" alt="" width="128" height="128" />Proximamente Tutos de: JAVA, WebObjects, ActionScript Avanzado, Prototypes con Scrptaculous, y dos tres cosas que he aprendido pero no he tenido mucho tiempo para compartir, les mando un gran saludo y muy buena vibra a todos, hasta pronto.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sectorweb.net/2008/10/11/no-estoy-muerto-solo-estoy-ocupado/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Como hacer un sistema de usuarios con PHP y MySQL</title>
		<link>http://www.sectorweb.net/2008/01/17/como-hacer-un-sistema-de-usuarios-con-php-y-mysql/</link>
		<comments>http://www.sectorweb.net/2008/01/17/como-hacer-un-sistema-de-usuarios-con-php-y-mysql/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 05:55:39 +0000</pubDate>
		<dc:creator>Rodrigo-Λzul</dc:creator>
		
		<category><![CDATA[PHP y mySQL]]></category>

		<guid isPermaLink="false">http://www.sectorweb.net/2008/01/17/como-hacer-un-sistema-de-usuarios-con-php-y-mysql/</guid>
		<description><![CDATA[
Desde hace ya un buen tiempo queria hacer un tutorial de php y mysql pero la falta de tiempo y algunos imprevistos me lo habian impedido, en este tutorial aprenderan algunas cosas basicas y no tan basicas de lo que es php y mySQL, jugaran con html y php, aprenderan a usar las tablas y [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center"><a href="http://www.sectorweb.net/2008/01/17/como-hacer-un-sistema-de-usuarios-con-php-y-mysql/"><img title="php y MYSQL" src="http://www.sectorweb.net/tutoriales/sistemausuarios/principal.gif" border="0" alt="pphp y MYSQL" /></a></p>
<p>Desde hace ya un buen tiempo queria hacer un tutorial de php y mysql pero la falta de tiempo y algunos imprevistos me lo habian impedido, en este tutorial aprenderan algunas cosas basicas y no tan basicas de lo que es php y mySQL, jugaran con html y php, aprenderan a usar las tablas y bases de datos, todo en este tutorial, espero no haber hecho mal jijiji de todos modos cualquier duda o problema por favor <a href="http://www.foro.sectorweb.net/"><strong>comentenlo en el Foro</strong></a> o visiten <a href="http://www.php.net/" target="_blank"><strong>http://www.php.net</strong></a> ahi podran buscar lo que significa cada sentencia, bueno los dejo con esto que les prepare.<strong> El tutorial ha sido actualizado! se recibieron mejoras departe del equipo <a href="http://www.xombra.com/" target="_blank">Xombra</a>, evitando asi inyeccciones SQL y mejorando el codigo en gran medida un saludo para ellos por haberlo mejorado!!</strong><span id="more-73"></span></p>
<h2>Si ya te la sabes, de una vez bajatelo!<img src="http://www.sectorweb.net/imagenes/zip.gif" border="0" alt="" /><a href="http://www.sectorweb.net/tutoriales/sistemausuarios/sesion.zip">Sistema de Usuarios Actualizado<img src="http://www.sectorweb.net/imagenes/zip.gif" border="0" alt="" /></a></h2>
<p class="step"><span class="steptitle">Paso 1</span>Crear una base de datos, desde tu panel de administración, asignarle un usuario y un password.</p>
<p style="text-align: center"><img src="http://www.sectorweb.net/tutoriales/sistemausuarios/1.gif" alt="" /></p>
<p class="step"><span class="steptitle">Paso 2</span>Ingresar a phpMyAdmin, seleccionar la base de datos que creamos ir al menu superios SQL y ejecutar la siguiente consulta o el .sql que viene en la carpeta, para crear la tabla usuarios.</p>
<div class="igBar"><span id="lmysql-9"><a href="#" onclick="javascript:showCodeTxt('mysql-9'); return false;">Ver codigo en Texto - Recomendable</a></span></div>
<div class="syntax_hilite"><span class="langName">MySQL:</span>
<div id="mysql-9">
<div class="mysql">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">CREATE TABLE</span> usuarios<span style="color: #66cc66;">&#40;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">`id` <span style="color: #aa9933; font-weight: bold;">INT</span><span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;color:#800000;">4</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #aa3399; font-weight: bold;">NOT NULL</span> <span style="color: #aa3399; font-weight: bold;">AUTO_INCREMENT</span> ,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">`nombre` <span style="color: #aa9933; font-weight: bold;">TEXT</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">`apaterno` <span style="color: #aa9933; font-weight: bold;">TEXT</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">`amaterno` <span style="color: #aa9933; font-weight: bold;">TEXT</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">`login` <span style="color: #aa9933; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;color:#800000;">40</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #aa3399; font-weight: bold;">NOT NULL</span> ,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">`password` <span style="color: #aa9933; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;color:#800000;">80</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #aa3399; font-weight: bold;">NOT NULL</span> ,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">`email` <span style="color: #aa9933; font-weight: bold;">TEXT</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #aa3399; font-weight: bold;">UNIQUE</span> KEY <span style="color: #66cc66;">&#40;</span> id <span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>** La imagen acontinuacion varia ya que han sido actualizado algunos valores</p>
<p style="text-align: center"><img src="http://www.sectorweb.net/tutoriales/sistemausuarios/2.gif" alt="" /></p>
<p class="step"><span class="steptitle">Paso 3</span>Una ves creada la tabla, creamos nuestro archivo de registro el cual llamaremos <strong>form.html</strong>, tendra un formulario con los siguientes campos y este se encargara de enviar todas las variables por el metodo POST al archivo crea_usuarios.php (las variables son el parametro que tiene <strong>nane=</strong> en cada input). El metodo POST es usado para pasar variables sin que nadie las vea hagan de cuenta que las pasa por debajo y el metodo GET las pasa por medio de la URL ejemplo: http://www.sectorweb.net/post.php?action=edit&amp;post=73</p>
<div class="igBar"><span id="lhtml-10"><a href="#" onclick="javascript:showCodeTxt('html-10'); return false;">Ver codigo en Texto - Recomendable</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-10">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/form.html"><span style="color: #000000; font-weight: bold;">&lt;form</span></a> <span style="color: #000066;">action</span>=<span style="color: #ff0000;">"crea_usuarios.php"</span> <span style="color: #000066;">method</span>=<span style="color: #ff0000;">"post"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span> Login(nick):</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"login"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/form&gt;</span></span> <span style="color: #009900;"><a href="http://december.com/html/4/element/form.html"><span style="color: #000000; font-weight: bold;">&lt;form</span></a> <span style="color: #000066;">action</span>=<span style="color: #ff0000;">"crea_usuarios.php"</span> <span style="color: #000066;">method</span>=<span style="color: #ff0000;">"post"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Password:</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"pass1"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"password"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/form&gt;</span></span> <span style="color: #009900;"><a href="http://december.com/html/4/element/form.html"><span style="color: #000000; font-weight: bold;">&lt;form</span></a> <span style="color: #000066;">action</span>=<span style="color: #ff0000;">"crea_usuarios.php"</span> <span style="color: #000066;">method</span>=<span style="color: #ff0000;">"post"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Repite Password:</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"pass2"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"password"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Nombre:</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"nombre"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Apellido Paterno:</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"apaterno"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Apellido Materno:</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"amaterno"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span>E-mail:</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"email"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span> <span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"Crear"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"submit"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span> <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/form&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p style="text-align: center"><img src="http://www.sectorweb.net/tutoriales/sistemausuarios/3e.gif" border="1" alt="" /></p>
<p class="step"><span class="steptitle">Paso 4</span>Configurar nuestro archivo <strong>config.php</strong> el cual contiene todos los datos de autentificacion de nuestra base de datos, solo hay que asignarle a las variables los datos de la base de datos el usuario y la contraseña y el server que casi siempre es localhost.</p>
<div class="igBar"><span id="lphp-11"><a href="#" onclick="javascript:showCodeTxt('php-11'); return false;">Ver codigo en Texto - Recomendable</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-11">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;lt;? <span style="color:#000000;">$server</span>=<span style="color:#FF0000;">"localhost"</span>; <span style="color:#ff9900;">/* Nuestro server mysql */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000;">$database</span>=<span style="color:#FF0000;">"fu000207_pruebas"</span>; <span style="color:#ff9900;">/* Nuestra base de datos */</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000;">$dbpass</span>=<span style="color:#FF0000;">"password"</span>; <span style="color:#ff9900;">/*Nuestro password mysql */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000;">$dbuser</span>=<span style="color:#FF0000;">"fu000207_usuario"</span>; <span style="color:#ff9900;">/* Nuestro user mysql */</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">?&amp;gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p class="step"><span class="steptitle">Paso 5</span>Es hora de crear el archivo <strong>crea_usuarios.php</strong>. El formulario nos avento las variables ahora solo hay que cacharlas, bueno para atraparlas utilizaremos la veriable de servidor $_POST una ves atrapado se lo asignamos a una nueva variable, algo asi<strong> $login = htmlspecialchars(trim($_POST['login']));</strong> eliminamos espacios con trim y caracteres especiales con htmlspecialshars, aqui ya tenemos el valor del nick dentro de la variable $login, una ves hecho eso con todas las varibles asiganmos a la variable <strong>$query</strong> la siguiente consulta: <strong>$query = sprintf("SELECT login FROM usuarios WHERE usuarios.login='%s'",mysql_real_escape_string($login));</strong> la cual nos dice:  Selecciona el campo login de la tabla usuarios donde el campo login sea igual al valor de nuestra variable login(se le añade la funcion <strong>mysql_real_escape_string() esta </strong>escapa cualquier tipo de caracter con el que se pueda hacer una inyeccion SQL o que afecte la integridad de nuestros datos), hacemos nuestra conexion y se la asiganmos a la variable <strong>$link</strong> ahora detonamos la consulta y la almacenamos en <strong>$result</strong> hecho esto hacemos la siguiente decisión: <strong>if(mysql_num_rows($result))</strong> la cual nos devolvera un valor boleano (verdadero o falso) si es verdadero significa que encontro al menos un elemento en la base de datos que coincide con nuestra variable $login, esto significa que ya hay un usuario con ese nick entonces envia un mensaje pidiendo cambiar el nick, si no existe nadie en la base de datos entonces hay que comparar si las variables del password coinciden o no, si no coinciden envia un mensaje de alerta y si si son iguales encripta el password con la funcion MD5 ahora introduciremos los valores de las variables en la base de datos, la instruccion es : <strong>$query  =  sprintf("INSERT INTO usuarios (login, nombre, apaterno, amaterno, password, email) VALUES ('%s','%s','%s', '%s','%s','%s')",mysql_real_escape_string($login),mysql_real_escape_string($nombre),<br />
mysql_real_escape_string($apaterno),mysql_real_escape_string($amaterno),mysql_real_escape_string($pass1),   mysql_real_escape_string($email));</strong> y se la asignamos a la variable <strong>$query</strong>, la cual nos dice Insertar en la tabla usuarios en el campo login,nombre,apaterno,amaterno,password,email los valores de las variables $login,$nombre,$apaterno, $amaterno,$pass1,$email, cabe mencionar que hay que revisar el orden que tienen y que coincidan los campos con las variables, comunmente no inserta por ese detalle, ahora ejecutamos esa instruccion y la almacenamos en $result ahora hacemos la siguiente decision: <strong>if(mysql_affected_rows())</strong> el cual nos devuelvera el número de filas afectadas en la ultima sentencia INSERT si es mayor a 0 entonces devolvera true, y enviara el mensaje que se introducieron y si no enviara que hubo error.</p>
<p class="step">Parte de codigo mejorada por el Team en seguridad informatica <a href="http://www.xombra.com/"><strong>Xombra</strong></a> <img src='http://www.sectorweb.net/wp-includes/images/smilies/coo.gif' alt='(Y)' class='wp-smiley' /> </p>
<div class="igBar"><span id="lphp-12"><a href="#" onclick="javascript:showCodeTxt('php-12'); return false;">Ver codigo en Texto - Recomendable</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-12">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;lt;?php</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// modificacion de codigo Xombra (www.xombra.com) 21/03/2009 para sectorweb.net</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">include</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"config.php"</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#ff9900;">/*Traemos el archivo config*/</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#ff9900;">/*Recibimos las variables por el metodo POST*/</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000;">$login</span> = <a href="http://www.php.net/htmlspecialchars"><span style="color:#000066;">htmlspecialchars</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/trim"><span style="color:#000066;">trim</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'login'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000;">$pass1</span> = <a href="http://www.php.net/trim"><span style="color:#000066;">trim</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'pass1'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000;">$pass2</span> = <a href="http://www.php.net/trim"><span style="color:#000066;">trim</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'pass2'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000;">$nombre</span>= <a href="http://www.php.net/htmlspecialchars"><span style="color:#000066;">htmlspecialchars</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/trim"><span style="color:#000066;">trim</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'nombre'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000;">$apaterno</span>= <a href="http://www.php.net/htmlspecialchars"><span style="color:#000066;">htmlspecialchars</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/trim"><span style="color:#000066;">trim</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'apaterno'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000;">$amaterno</span>= <a href="http://www.php.net/htmlspecialchars"><span style="color:#000066;">htmlspecialchars</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/trim"><span style="color:#000066;">trim</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'amaterno'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000;">$email</span> = <a href="http://www.php.net/htmlspecialchars"><span style="color:#000066;">htmlspecialchars</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/trim"><span style="color:#000066;">trim</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'email'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#ff9900;">/*Hacemos la consulta */</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// $query=&quot;SELECT * FROM usuarios WHERE login='$login'&quot;; //ANTES</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000;">$link</span>=<a href="http://www.php.net/mysql_connect"><span style="color:#000066;">mysql_connect</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$server</span>,<span style="color:#000000;">$dbuser</span>,<span style="color:#000000;">$dbpass</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000;">$query</span> = <a href="http://www.php.net/sprintf"><span style="color:#000066;">sprintf</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"SELECT login FROM usuarios WHERE usuarios.login='%s'"</span>,  <span style="color:#FF9933; font-style:italic;">// Ahora</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/mysql_real_escape_string"><span style="color:#000066;">mysql_real_escape_string</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$login</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000;">$result</span>=<a href="http://www.php.net/mysql_db_query"><span style="color:#000066;">mysql_db_query</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$database</span>,<span style="color:#000000;">$query</span>,<span style="color:#000000;">$link</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/mysql_num_rows"><span style="color:#000066;">mysql_num_rows</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$result</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"El usuario ya existe en la BD"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#616100;">else</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/mysql_free_result"><span style="color:#000066;">mysql_free_result</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$result</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#ff9900;">/* Ahora comprovamos que los dos pass coinciden */</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$pass1</span>!=<span style="color:#000000;">$pass2</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"Los passwords deben coincidir"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'Click &amp;lt;a href=&quot;form.html&quot;&amp;gt;aquí&amp;lt;/a&amp;gt; para volver al formulario'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#616100;">else</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#ff9900;">/* Encriptamos &quot;Ciframos&quot; el password</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"></li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#ff9900;">// $pass1=crypt($pass2, &quot;semilla&quot;); // ANTES */</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000;">$pass1</span>=<a href="http://www.php.net/sha1"><span style="color:#000066;">sha1</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/md5"><span style="color:#000066;">md5</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$pass1</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#FF9933; font-style:italic;">// Ahora</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#ff9900;">/* $query=&quot;INSERT INTO usuarios (login, nombre, apaterno, amaterno, password, email) VALUES ('$login','$nombre','$apaterno', '$amaterno','$pass1','$email')&quot;; */</span>  <span style="color:#FF9933; font-style:italic;">// Antes</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000;">$query</span>  =  <a href="http://www.php.net/sprintf"><span style="color:#000066;">sprintf</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"INSERT INTO usuarios (login, nombre, apaterno, amaterno, password, email) VALUES ('%s','%s','%s', '%s','%s','%s')"</span>,  <span style="color:#FF9933; font-style:italic;">// Ahora</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/mysql_real_escape_string"><span style="color:#000066;">mysql_real_escape_string</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$login</span><span style="color:#006600; font-weight:bold;">&#41;</span>,   <a href="http://www.php.net/mysql_real_escape_string"><span style="color:#000066;">mysql_real_escape_string</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$nombre</span><span style="color:#006600; font-weight:bold;">&#41;</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/mysql_real_escape_string"><span style="color:#000066;">mysql_real_escape_string</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$apaterno</span><span style="color:#006600; font-weight:bold;">&#41;</span>,<a href="http://www.php.net/mysql_real_escape_string"><span style="color:#000066;">mysql_real_escape_string</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$amaterno</span><span style="color:#006600; font-weight:bold;">&#41;</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/mysql_real_escape_string"><span style="color:#000066;">mysql_real_escape_string</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$pass1</span><span style="color:#006600; font-weight:bold;">&#41;</span>,   <a href="http://www.php.net/mysql_real_escape_string"><span style="color:#000066;">mysql_real_escape_string</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$email</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000;">$result</span>=<a href="http://www.php.net/mysql_db_query"><span style="color:#000066;">mysql_db_query</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$database</span>,<span style="color:#000000;">$query</span>,<span style="color:#000000;">$link</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/mysql_affected_rows"><span style="color:#000066;">mysql_affected_rows</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"Usuario introducido correctamente"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#616100;">else</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"Error introduciendo el usuario"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#ff9900;">/* Cierre del else */</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#ff9900;">/* Cierre del else que corresponde a if(mysql_affected_rows.....) */</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#ff9900;">/* Cierre del else que corresponde a if(mysql_num_rows...) */</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">?&amp;gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p class="step"><span class="steptitle">Paso 6</span>Parece que si ingreso los datos, pero vamos a comprobarlo de todos modos, para eso vamos a phpMyAdmin seleciconamos nuestra base de datos clicleamos en el recuadro que esta junto a la tabla y automaticamente nos trae todos los datos introducidos en esa tabla. Si no hay nada verifica que hiciste bien tu INSERT INTO y que tus variables tengan valores</p>
<p style="text-align: center"><img src="http://www.sectorweb.net/tutoriales/sistemausuarios/3.gif" border="1" alt="" /></p>
<p style="text-align: center"><img src="http://www.sectorweb.net/tutoriales/sistemausuarios/4.gif" alt="" /></p>
<p style="text-align: center"><img src="http://www.sectorweb.net/tutoriales/sistemausuarios/5.gif" alt="" /></p>
<p class="step"><span class="steptitle">Paso 7</span>Vamos a hacer nuestra pagina de <strong>login.php, </strong>primero verificamos si ya esta iniciada la sesión, si si entonces redirecciona a la pagina user.php que acontinuacion crearemos, si no se a iniciado la sesión entonces  imprime el formulario el cual enviara todos los datos a comprueba.php el cual se encargara de revisar si esta en la base de datos.</p>
<div class="igBar"><span id="lphp-13"><a href="#" onclick="javascript:showCodeTxt('php-13'); return false;">Ver codigo en Texto - Recomendable</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-13">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;lt;? <a href="http://www.php.net/session_start"><span style="color:#000066;">session_start</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/isset"><span style="color:#000066;">isset</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$SESSION</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/header"><span style="color:#000066;">header</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"location:user.php"</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#ff9900;">/* Si ha iniciado la sesion, vamos a user.php */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#616100;">else</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#ff9900;">/* Cerramos la parte de codigo PHP porque vamos a escribir bastante HTML y nos será mas cómodo así que metiendo echo's */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">?&amp;gt;&lt;/p&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;h1&gt;Identificación&lt;/h1&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;form <span style="color:#000000; font-weight:bold;">class</span>=<span style="color:#FF0000;">"miform"</span> action=<span style="color:#FF0000;">"comprueba.php"</span> method=<span style="color:#FF0000;">"post"</span>&gt; Login:</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;input name=<span style="color:#FF0000;">"login"</span> type=<span style="color:#FF0000;">"text"</span> /&gt;Password:</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;input name=<span style="color:#FF0000;">"pass"</span> type=<span style="color:#FF0000;">"password"</span> /&gt; &lt;input <span style="color:#000000; font-weight:bold;">class</span>=<span style="color:#FF0000;">"boton"</span> type=<span style="color:#FF0000;">"submit"</span> value=<span style="color:#FF0000;">"Entrar"</span> /&gt; &lt;/form&gt;<span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#ff9900;">/* Y cerramos el else */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">?&amp;gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p style="text-align: center"><img src="http://www.sectorweb.net/tutoriales/sistemausuarios/6.gif" border="1" alt="" /></p>
<p class="step"><span class="steptitle">Paso 8</span>Crear el archivo <strong>comprueba.php</strong> este recibira las dos variables por el metodo POST les quitara espacios y caracteres especiales, encriptamos en md5 el password para despues poderlo comparar, ejecutamos la consulta asi: <strong> $query = sprintf("SELECT usuarios.login,usuarios.nombre,usuarios.apaterno,usuarios.amaterno,usuarios.email FROM usuarios WHERE usuarios.login='%s' &amp;&amp; usuarios.password = '%s'",mysql_real_escape_string($login),mysql_real_escape_string($pass));</strong> y si devuelve un valor igual a 1 significa que encontro el user y el pass, entonces inica la session y le pasa las variables que ocuparemos a nuestra variable de servidor $_SESSION["nombre"]=$array["nombre"]; $array contiene un arreglo con los campos de ese usuario y hace un redireccionamiento al archivo user.php, si no enviara un mensaje diciendo que no existe ese usuario y si no  y si el password no es correcto envia un mensaje de password incorrecto .</p>
<p class="step">Parte de codigo mejorada por el Equipo en Seguridad Informatica <a href="http://www.xombra.com/"><strong>Xombra</strong></a> <img src='http://www.sectorweb.net/wp-includes/images/smilies/coo.gif' alt='(Y)' class='wp-smiley' /> </p>
<div class="igBar"><span id="lphp-14"><a href="#" onclick="javascript:showCodeTxt('php-14'); return false;">Ver codigo en Texto - Recomendable</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-14">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;lt;?php <a href="http://www.php.net/session_start"><span style="color:#000066;">session_start</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// modificacion de codigo Xombra (www.xombra.com) 21/03/2009 para sectorweb.net</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">include</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"config.php"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000;">$login</span> = <a href="http://www.php.net/htmlspecialchars"><span style="color:#000066;">htmlspecialchars</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/trim"><span style="color:#000066;">trim</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'login'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000;">$pass</span> = <a href="http://www.php.net/sha1"><span style="color:#000066;">sha1</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/md5"><span style="color:#000066;">md5</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/trim"><span style="color:#000066;">trim</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'pass'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#FF9933; font-style:italic;">// encriptamos en MD5 para despues comprar (Modificado)</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// $query=&quot;SELECT * FROM usuarios WHERE login='$login'&quot;; Antes</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000;">$link</span>=<a href="http://www.php.net/mysql_connect"><span style="color:#000066;">mysql_connect</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$server</span>,<span style="color:#000000;">$dbuser</span>,<span style="color:#000000;">$dbpass</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000;">$query</span> = <a href="http://www.php.net/sprintf"><span style="color:#000066;">sprintf</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"SELECT usuarios.login,</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">usuarios.nombre,</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">usuarios.apaterno,</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">usuarios.amaterno,</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">usuarios.email</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">FROM usuarios WHERE usuarios.login='%s' &amp;amp;&amp;amp; usuarios.password = '%s'"</span>,  <span style="color:#FF9933; font-style:italic;">// Ahora</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/mysql_real_escape_string"><span style="color:#000066;">mysql_real_escape_string</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$login</span><span style="color:#006600; font-weight:bold;">&#41;</span>,<a href="http://www.php.net/mysql_real_escape_string"><span style="color:#000066;">mysql_real_escape_string</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$pass</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000;">$result</span>=<a href="http://www.php.net/mysql_db_query"><span style="color:#000066;">mysql_db_query</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$database</span>,<span style="color:#000000;">$query</span>,<span style="color:#000000;">$link</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// if(mysql_num_rows($result)==0){ // antes</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/mysql_num_rows"><span style="color:#000066;">mysql_num_rows</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$result</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#FF9933; font-style:italic;">// nos devuelve 1 si encontro el usuario y el password</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000;">$array</span>=<a href="http://www.php.net/mysql_fetch_array"><span style="color:#000066;">mysql_fetch_array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$result</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//  if($array[&quot;password&quot;]==crypt($pass,&quot;semilla&quot;) ){ // Antes</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#ff9900;">/* Comprobamos que el password encriptado en la BD coincide con el password que nos han dado al encriptarlo. Recuerda usar semilla para encriptar los dos passwords. */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000;">$_SESSION</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"login"</span><span style="color:#006600; font-weight:bold;">&#93;</span>=<span style="color:#000000;">$array</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"login"</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000;">$_SESSION</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"nombre"</span><span style="color:#006600; font-weight:bold;">&#93;</span>=<span style="color:#000000;">$array</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"nombre"</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000;">$_SESSION</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"apaterno"</span><span style="color:#006600; font-weight:bold;">&#93;</span>=<span style="color:#000000;">$array</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"apaterno"</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000;">$_SESSION</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"amaterno"</span><span style="color:#006600; font-weight:bold;">&#93;</span>=<span style="color:#000000;">$array</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"amaterno"</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000;">$_SESSION</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"email"</span><span style="color:#006600; font-weight:bold;">&#93;</span>=<span style="color:#000000;">$array</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"email"</span><span style="color:#006600; font-weight:bold;">&#93;</span>; <span style="color:#FF9933; font-style:italic;">// Agrgado Nuevo</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/header"><span style="color:#000066;">header</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"Location:user.php"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span>  <span style="color:#616100;">else</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"Login o Password Incorrectos"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;  <span style="color:#FF9933; font-style:italic;">// Ahora</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">?&amp;gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p class="step"><span class="steptitle">Paso 8</span>Crear la pagina de <strong>user.php </strong>este contendra las variables que le pasamos desde el archivo comprueba.php y solo sera visto por usuarios que se hayan identificado correctamente, primero comprueba si se a iniciado sesion si no redirecciona a login y si si imprime el contenido para el usuario</p>
<div class="igBar"><span id="lphp-15"><a href="#" onclick="javascript:showCodeTxt('php-15'); return false;">Ver codigo en Texto - Recomendable</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-15">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;lt;? <a href="http://www.php.net/session_start"><span style="color:#000066;">session_start</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span>!<a href="http://www.php.net/isset"><span style="color:#000066;">isset</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$_SESSION</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/header"><span style="color:#000066;">header</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"location:login.php"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#616100;">else</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">""</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">&lt;h1&gt;SectorWeb.net&lt;/h1&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"Bienvenido al Area de usurios: &lt;strong&gt;"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#000000;">$_SESSION</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"nombre"</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#FF0000;">" "</span>.<span style="color:#000000;">$_SESSION</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"apaterno"</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#FF0000;">" "</span>.<span style="color:#000000;">$_SESSION</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"amaterno"</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#FF0000;">" "</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"&lt;/strong&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">Has entrado con el nick: &lt;strong&gt; "</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#000000;">$_SESSION</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"login"</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"&lt;/strong&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">Para cerrar la sesión, pulsa: &lt;a href="</span>http:<span style="color:#FF9933; font-style:italic;">//www.sectorweb.net/logout.php&quot;&gt;Aqui&lt;/a&gt;&quot;;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">""</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">?&amp;gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p style="text-align: center"><img src="http://www.sectorweb.net/tutoriales/sistemausuarios/7.gif" alt="" /></p>
<p class="step"><span class="steptitle">Paso 9</span>Crear la pagina de <strong>logout.php </strong>este se encargara de cerrar la sesion</p>
<div class="igBar"><span id="lphp-16"><a href="#" onclick="javascript:showCodeTxt('php-16'); return false;">Ver codigo en Texto - Recomendable</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-16">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;lt;? <a href="http://www.php.net/session_start"><span style="color:#000066;">session_start</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span>!<a href="http://www.php.net/isset"><span style="color:#000066;">isset</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000;">$_SESSION</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/header"><span style="color:#000066;">header</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"location:login.php"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#616100;">else</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/session_unset"><span style="color:#000066;">session_unset</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/session_destroy"><span style="color:#000066;">session_destroy</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">&lt;h1&gt;SectorWeb.net&lt;/h1&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"Las variables de sesión han sido eliminadas, y la sesión se ha dado por finalizada correctamente da click &lt;a href="</span>http:<span style="color:#FF9933; font-style:italic;">//www.sectorweb.net/%5C%22login.php%5C%22&quot;&gt;aqui para loguearte&lt;/a&gt;&quot;;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">?&amp;gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<h2><a rel="gb_page_fs[]" href="http://www.sectorweb.net/tutoriales/sistemausuarios/ejemplo2/index.php"><img src="http://www.sectorweb.net/imagenes/ej.gif" border="0" alt="" />Con JavaScript,un Captcha y envio de mails puedes hacer esto...pero eso es otra historia!<img src="http://www.sectorweb.net/imagenes/ej.gif" border="0" alt="" /></a></h2>
<h2>Espero que hayan aprendido un poco de php y mySQL jejeje , dudas y problemas en el foro porfavor! <img src='http://www.sectorweb.net/wp-includes/images/smilies/sonris.gif' alt=':D' class='wp-smiley' /> </h2>
]]></content:encoded>
			<wfw:commentRss>http://www.sectorweb.net/2008/01/17/como-hacer-un-sistema-de-usuarios-con-php-y-mysql/feed/</wfw:commentRss>
		</item>
		<item>
		<title>1er Aniversario de SectorWeb</title>
		<link>http://www.sectorweb.net/2008/01/07/1er-aniversario-de-sectorweb/</link>
		<comments>http://www.sectorweb.net/2008/01/07/1er-aniversario-de-sectorweb/#comments</comments>
		<pubDate>Mon, 07 Jan 2008 05:31:11 +0000</pubDate>
		<dc:creator>Rodrigo-Λzul</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.sectorweb.net/2008/01/07/1er-aniversario-de-sectorweb/</guid>
		<description><![CDATA[
Que rápido ha pasado el tiempo, un año de optimismo, de alegrías, desveladas, de sacrificio, de aprender con nuestro amigo google, de ver videotutoriales y tutoriales, de leer libros, de superarnos y ayudarnos entre si, un año donde hemos superado todas nuestras metas y retos, un añito de desarrollo aprendizaje y compañerismo! un año de [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align: center"><a href="http://www.sectorweb.net/2008/01/07/1er-aniversario-de-sectorweb/"><img border="0" src="http://www.sectorweb.net/tutoriales/1aniversario/principal.jpg" /></a></div>
<p>Que rápido ha pasado el tiempo, un año de optimismo, de alegrías, desveladas, de sacrificio, de aprender con nuestro amigo google, de ver videotutoriales y tutoriales, de leer libros, de superarnos y ayudarnos entre si, un año donde hemos superado todas nuestras metas y retos, un añito de desarrollo aprendizaje y compañerismo! un año de SectorWeb. Y para festejarlo hice este fondo! de pantalla esperando que sea de su agrado, el cual refleja el poder que tenemos desde el momento que decidimos aprender por nuestra cuenta, ser diferentes y mejores cada dia, hice dos versiones una con mensaje en la parte superior y otra sin el mensaje.</p>
<p align="center"><strong>Con texto arriba</strong> <strong><br />
</strong></p>
<p align="center"><a target="_blank" href="http://www.sectorweb.net/tutoriales/1aniversario/1280x800.jpg">[1280x800]</a> <a target="_blank" href="http://www.sectorweb.net/tutoriales/1aniversario/1280x1024.jpg">[1280X1024]</a> <a target="_blank" href="http://www.sectorweb.net/tutoriales/1aniversario/1024x768.jpg">[1024X768]</a></p>
<p align="center"><strong>  Sin texto arriba</strong></p>
<p align="center"><a target="_blank" href="http://www.sectorweb.net/tutoriales/1aniversario/1280x800_2.jpg">[1280x800]</a> <a target="_blank" href="http://www.sectorweb.net/tutoriales/1aniversario/1280x1024_2.jpg">[1280X1024]</a> <a target="_blank" href="http://www.sectorweb.net/tutoriales/1aniversario/1024x768_2.jpg">[1024X768]<span id="more-74"></span></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sectorweb.net/2008/01/07/1er-aniversario-de-sectorweb/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Links importantes I</title>
		<link>http://www.sectorweb.net/2007/12/20/links-rapidos-i/</link>
		<comments>http://www.sectorweb.net/2007/12/20/links-rapidos-i/#comments</comments>
		<pubDate>Thu, 20 Dec 2007 06:59:26 +0000</pubDate>
		<dc:creator>Rodrigo-Λzul</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.sectorweb.net/2007/12/20/links-rapidos-i/</guid>
		<description><![CDATA[Curso Completo de Action Script --------------------------- Knc
Crear un Santa Claus con Adobe Photoshop ----- V@bc
Vectorizar una imagen en Flash ------------------------- Lucas
Adobe Creative CS3 ------------------------------------------------ Azul
Mini AJAX ------------------------------------------------ Viniegra_web
Iluminar interiores con V-Ray -------------------------------- Azul
]]></description>
			<content:encoded><![CDATA[<div align="center"><img width="15" height="15" title="idea" src="http://www.foro.sectorweb.net/images/smilies/_lightbulb__revision_by_Mrichston.gif" /><strong><a style="font-size: 10pt" target="_blank" href="http://www.foro.sectorweb.net/viewtopic.php?f=32&#038;t=48">Curso Completo de Action Script</a></strong> --------------------------- <img width="15" height="15" title="idea" src="http://www.sectorweb.net/wp-content/themes/Mio/images/user.png" /><strong><a style="font-size: 10pt" target="_blank" href="http://www.foro.sectorweb.net/memberlist.php?mode=viewprofile&#038;u=55">Knc</a></strong></div>
<div align="center"><img width="15" height="15" title="idea" src="http://www.foro.sectorweb.net/images/smilies/_lightbulb__revision_by_Mrichston.gif" /><strong><a style="font-size: 10pt" target="_blank" href="http://www.foro.sectorweb.net/viewtopic.php?f=26&#038;t=76">Crear un Santa Claus con Adobe Photoshop</a></strong> ----- <img width="15" height="15" title="idea" src="http://www.sectorweb.net/wp-content/themes/Mio/images/user.png" /><strong><a style="font-size: 10pt" target="_blank" href="http://www.foro.sectorweb.net/memberlist.php?mode=viewprofile&#038;u=54">V@bc</a></strong></div>
<div align="center"><img width="15" height="15" title="idea" src="http://www.foro.sectorweb.net/images/smilies/_lightbulb__revision_by_Mrichston.gif" /><strong><a style="font-size: 10pt" target="_blank" href="http://www.wydstudios.com/blog/wordpress/2007/12/13/vectorizamos-en-flash/">Vectorizar una imagen en Flash</a></strong> ------------------------- <img width="15" height="15" title="idea" src="http://www.sectorweb.net/wp-content/themes/Mio/images/user.png" /><strong><a style="font-size: 10pt" target="_blank" href="http://www.wydstudios.com/blog/wordpress/2007/12/13/vectorizamos-en-flash/">Lucas</a></strong></div>
<div align="center"><img width="15" height="15" title="idea" src="http://www.foro.sectorweb.net/images/smilies/_lightbulb__revision_by_Mrichston.gif" /><strong><a style="font-size: 10pt" target="_blank" href="http://www.foro.sectorweb.net/viewtopic.php?f=13&#038;t=16">Adobe Creative CS3</a></strong> ------------------------------------------------ <img width="15" height="15" title="idea" src="http://www.sectorweb.net/wp-content/themes/Mio/images/user.png" /><strong><a style="font-size: 10pt" target="_blank" href="http://www.foro.sectorweb.net/memberlist.php?mode=viewprofile&#038;u=53">Azul</a></strong></div>
<div align="center"><img width="15" height="15" title="idea" src="http://www.foro.sectorweb.net/images/smilies/_lightbulb__revision_by_Mrichston.gif" /><strong><a style="font-size: 10pt" target="_blank" href="http://www.foro.sectorweb.net/viewtopic.php?f=17&#038;t=77">Mini AJAX</a></strong> ------------------------------------------------ <img width="15" height="15" title="idea" src="http://www.sectorweb.net/wp-content/themes/Mio/images/user.png" /><strong><a style="font-size: 10pt" target="_blank" href="http://www.foro.sectorweb.net/memberlist.php?mode=viewprofile&#038;u=71">Viniegra_web</a></strong></div>
<div align="center"><img width="15" height="15" title="idea" src="http://www.foro.sectorweb.net/images/smilies/_lightbulb__revision_by_Mrichston.gif" /><strong><a style="font-size: 10pt" target="_blank" href="http://www.foro.sectorweb.net/viewtopic.php?f=29&#038;t=66">Iluminar interiores con V-Ray</a></strong> -------------------------------- <img width="15" height="15" title="idea" src="http://www.sectorweb.net/wp-content/themes/Mio/images/user.png" /><strong><a style="font-size: 10pt" target="_blank" href="http://www.foro.sectorweb.net/memberlist.php?mode=viewprofile&#038;u=53">Azul</a></strong></div>
]]></content:encoded>
			<wfw:commentRss>http://www.sectorweb.net/2007/12/20/links-rapidos-i/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Efecto reflejo con objetos</title>
		<link>http://www.sectorweb.net/2007/12/17/efecto-reflejo-con-objetos/</link>
		<comments>http://www.sectorweb.net/2007/12/17/efecto-reflejo-con-objetos/#comments</comments>
		<pubDate>Mon, 17 Dec 2007 22:56:13 +0000</pubDate>
		<dc:creator>Rodrigo-Λzul</dc:creator>
		
		<category><![CDATA[Photoshop]]></category>

		<category><![CDATA[Tutoriales]]></category>

		<guid isPermaLink="false">http://www.sectorweb.net/2007/12/17/efecto-reflejo-con-objetos/</guid>
		<description><![CDATA[


Siento mucho la tardanza pero las matematicas por poco y me hacian reprobar el año jajaja pero me salve fiiiuuu!, y para comenzar con el festejo les traigo este tutorial muy util donde podran crear el efecto reflejo en objetos y no solo en planos como lo hemos visto con anterioridad, en este tutorial explique [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align: center">
<div style="text-align: center"><a href="http://www.sectorweb.net/2007/12/17/efecto-reflejo-con-objetos/"><img border="0" title="efecto reflejo con objetos" alt="efecto reflejo con objetos" src="http://www.sectorweb.net/tutoriales/efectoreflejoobjetos/principal.jpg" /></a></div>
</div>
<p>Siento mucho la tardanza pero las matematicas por poco y me hacian reprobar el año jajaja pero me salve fiiiuuu!, y para comenzar con el festejo les traigo este tutorial muy util donde podran crear el efecto reflejo en objetos y no solo en planos como lo hemos visto con anterioridad, en este tutorial explique paso por paso asi que se ve un poco largo pero es muy facil y rapido de hacer.<span id="more-71"></span></p>
<p class="step"><span class="steptitle">Error</span>Con regularidad he visto este error en muchos diseños, simplemente intentan hacer el efecto como si fuera una imagen plana o cuadrada y el resultado es fatal, para que no les pase esto aqui estan los pasos para hacerlo bien.</p>
<div style="text-align: center"><img src="http://www.sectorweb.net/tutoriales/efectoreflejoobjetos/error.jpg" /></p>
<p class="step"><span class="steptitle">Recurso</span>Esta es la imagen que utilizaremos esta en formato png.</p>
<div style="text-align: center"><img width="400" src="http://www.sectorweb.net/tutoriales/efectoreflejoobjetos/material.png" /></p>
<p class="step">
<p><img src="http://www.sectorweb.net/tutoriales/efectoreflejoobjetos/1.jpg" /></p>
<p class="step">
<p><img src="http://www.sectorweb.net/tutoriales/efectoreflejoobjetos/2.jpg" /></p>
<p class="step">
<p><img src="http://www.sectorweb.net/tutoriales/efectoreflejoobjetos/3.jpg" /></p>
<p class="step">
<p><img src="http://www.sectorweb.net/tutoriales/efectoreflejoobjetos/4.jpg" /></p>
<p class="step">
<p><img src="http://www.sectorweb.net/tutoriales/efectoreflejoobjetos/5.jpg" /></p>
<p class="step">
<p><img src="http://www.sectorweb.net/tutoriales/efectoreflejoobjetos/6.jpg" /></p>
<p class="step">
<p><img src="http://www.sectorweb.net/tutoriales/efectoreflejoobjetos/7.jpg" /></p>
<p class="step">
<p><img src="http://www.sectorweb.net/tutoriales/efectoreflejoobjetos/8.jpg" /></p>
<p class="step">
<p><img src="http://www.sectorweb.net/tutoriales/efectoreflejoobjetos/9.jpg" /></p>
<p class="step">
<p><img src="http://www.sectorweb.net/tutoriales/efectoreflejoobjetos/10.jpg" /></p>
<p class="step">
<p><img src="http://www.sectorweb.net/tutoriales/efectoreflejoobjetos/11.jpg" /></p>
<p class="step">
<p><img src="http://www.sectorweb.net/tutoriales/efectoreflejoobjetos/12.jpg" /></p>
<p class="step">
<p><img src="http://www.sectorweb.net/tutoriales/efectoreflejoobjetos/13.jpg" /></div>
<p class="step"><span class="steptitle">Paso 2</span>Crear el degradado para dar efecto reflejo.</p>
<div style="text-align: center"><img src="http://www.sectorweb.net/tutoriales/efectoreflejoobjetos/14.jpg" /></p>
<p class="step">
<p><img src="http://www.sectorweb.net/tutoriales/efectoreflejoobjetos/15.jpg" /></p>
<p class="step">
<p><img src="http://www.sectorweb.net/tutoriales/efectoreflejoobjetos/16.jpg" /></p>
<p class="step">
<p><img src="http://www.sectorweb.net/tutoriales/efectoreflejoobjetos/17.jpg" /></p>
<p class="step">
<p><img src="http://www.sectorweb.net/tutoriales/efectoreflejoobjetos/18.jpg" /></p>
<p class="step">
<p><img src="http://www.sectorweb.net/tutoriales/efectoreflejoobjetos/19.jpg" /></div>
<p class="step"><span class="steptitle">Paso 3</span>Crear la sombra que ira debajo de el auto.</p>
<div style="text-align: center"><img src="http://www.sectorweb.net/tutoriales/efectoreflejoobjetos/21.jpg" /></p>
<p class="step">
<p><img src="http://www.sectorweb.net/tutoriales/efectoreflejoobjetos/22.jpg" /></p>
<p class="step">
<p><img src="http://www.sectorweb.net/tutoriales/efectoreflejoobjetos/23.jpg" /></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.sectorweb.net/2007/12/17/efecto-reflejo-con-objetos/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SectorWeb te desea una Feliz Navidad!</title>
		<link>http://www.sectorweb.net/2007/12/14/sectorweb-te-desea-una-feliz-navidad/</link>
		<comments>http://www.sectorweb.net/2007/12/14/sectorweb-te-desea-una-feliz-navidad/#comments</comments>
		<pubDate>Fri, 14 Dec 2007 03:36:18 +0000</pubDate>
		<dc:creator>Rodrigo-Λzul</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.sectorweb.net/2007/12/14/sectorweb-te-desea-una-feliz-navidad/</guid>
		<description><![CDATA[
Que tal gente de SectorWeb!, han llegado las fiestas navideñas, para algunos hermosas llenas de sorpresas, comida y regalos, mientras que para otros solo son una temporada en la que hay que seguir trabajando para poder comer, tristeza y soledad para unos, felicidad y amor para otros, es el tiempo donde puedes darte cuenta de [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align: center"><a href="http://www.sectorweb.net/2007/12/14/sectorweb-te-desea-una-feliz-navidad/"><img border="0" src="http://www.sectorweb.net/tutoriales/navidad2007/principal.jpg" /></a></div>
<p>Que tal gente de SectorWeb!, han llegado las fiestas navideñas, para algunos hermosas llenas de sorpresas, comida y regalos, mientras que para otros solo son una temporada en la que hay que seguir trabajando para poder comer, tristeza y soledad para unos, felicidad y amor para otros, es el tiempo donde puedes darte cuenta de el contraste que tiene este mundo, la mercadotecnia invade tu mente y solo piensas en comprar pensando que seras feliz con tu nuevo objeto jejeje. Pese a cualquier cosa pasatela muy bien, comprate el ordenador que siempre quisiste, convive con los que mas quieres, ayuda a quien lo necesita, aunque la vida te trate mal sonríele, vive el momento que no sabes que dia ya no estaras aqui, y antes de que salga la primer lágrima te digo de todo corazón ¡Feliz Navidad!.<span id="more-70"></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sectorweb.net/2007/12/14/sectorweb-te-desea-una-feliz-navidad/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Pizarra con InputDraw</title>
		<link>http://www.sectorweb.net/2007/11/18/pizarra-con-inputdraw/</link>
		<comments>http://www.sectorweb.net/2007/11/18/pizarra-con-inputdraw/#comments</comments>
		<pubDate>Mon, 19 Nov 2007 02:13:17 +0000</pubDate>
		<dc:creator>Rodrigo-Λzul</dc:creator>
		
		<category><![CDATA[AJAX]]></category>

		<category><![CDATA[Flash]]></category>

		<category><![CDATA[Recursos]]></category>

		<guid isPermaLink="false">http://www.sectorweb.net/2007/11/18/pizarra-con-inputdraw/</guid>
		<description><![CDATA[
Alguna ves se imaginaron tener en su sitio una pizarra donde pudieran rayar o firmar todos los que entraran? pues yo tampoco, pero un profesor fue el que me comento que estaba investigando como hacerle, pense... seguramente es con Flash y algo de AJAX, y si efectivamente navegando por la red me encontre con InputDraw [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align: center"><a href="http://www.sectorweb.net/2007/11/18/pizarra-con-inputdraw/"><img border="0" src="http://www.sectorweb.net/tutoriales/inputdraw/principal.jpg" /></a></div>
<p>Alguna ves se imaginaron tener en su sitio una pizarra donde pudieran rayar o firmar todos los que entraran? pues yo tampoco, pero un profesor fue el que me comento que estaba investigando como hacerle, pense... seguramente es con Flash y algo de AJAX, y si efectivamente navegando por la red me encontre con <a href="http://www.mainada.net/inputdraw">InputDraw</a> una pizarra con la que puedes rayar dentro de un sitio web.<span id="more-69"></span></p>
<p class="step"><a href="http://www.mainada.net/inputdraw">InputDraw</a> es un potente este script, si locombinas con MySQL puedes crear un libro de visitas, creas una base de datos para almacenar los valores del ultimo dibujo introducido y mostrarlo para ser reescrito o borrado por un nuevo usuario, esto significa que puedes tener un libro de visitas pero con dibujos! suena pro no? pues ya esta la idea y la forma de como hacerlo, el poco tiempo me impide crearlo, pero si lo pudiste hacer no dudes en compartirlo!. Para mas informacion puedes visitar el <a href="http://www.mainada.net/inputdraw">sitio del autor</a>. Este es el link de la version free, no encontre la version full si la consigues comparte el link por aqui o por el foro. Que lo disfruten!!!. Para usarlo solo hay que hacer lo siguiente:</p>
<div style="text-align: center"><img src="http://www.sectorweb.net/tutoriales/inputdraw/1.gif" /></div>
<div style="text-align: center">
<h2><img border="0" src="http://www.sectorweb.net/imagenes/zip.gif" /><a href="http://www.mainada.net/inputdraw/download_free/5">Descargar InputDraw<img border="0" src="http://www.sectorweb.net/imagenes/zip.gif" /></a></h2>
<h2><a rel="gb_page_fs[]" href="http://www.sectorweb.net/tutoriales/inputdraw/pizarra/ejemplo.html"><img border="0" src="http://www.sectorweb.net/imagenes/ej.gif" />Ejemplo<img border="0" src="http://www.sectorweb.net/imagenes/ej.gif" /></a></h2>
<h2><a href="http://www.mainada.net/inputdraw">Sitio del Autor</a></h2>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.sectorweb.net/2007/11/18/pizarra-con-inputdraw/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
