https://wiki.cabal.mx/index.php?title=Curso_b%C3%A1sico_de_PHP/MySQLConnectInc&feed=atom&action=history
Curso básico de PHP/MySQLConnectInc - Historial de revisiones
2024-03-28T11:55:50Z
Historial de revisiones para esta página en el wiki
MediaWiki 1.32.1
https://wiki.cabal.mx/index.php?title=Curso_b%C3%A1sico_de_PHP/MySQLConnectInc&diff=121973&oldid=prev
Rrc en 23:28 27 sep 2016
2016-09-27T23:28:21Z
<p></p>
<p><b>Página nueva</b></p><div>__NOTOC__<br />
* [[:#MySQLConnectInc | MySQLConnectInc]]<br />
** [[:#Explicación | Explicación]]<br />
** [[:#Descargarlo | Descargarlo]]<br />
<br />
== MySQLConnectInc ==<br />
<br />
<syntaxhighlight lang="php" line="GESHI_FANCY_LINE_NUMBERS"><br />
<?php<br />
echo( "<p class=\"LargeTextFont\">" );<br />
if( $conn = mysql_connect( "localhost", "clase", "PassWord" ) )<br />
echo( "\$conn = $conn<br />
<br />" );<br />
else<br />
{<br />
echo( "No puede conectarse<br />
</p>" );<br />
require_once( "incPie5.php" );<br />
exit( 1 );<br />
}<br />
<br />
if( mysql_select_db( "MyTest1", $conn ) )<br />
echo( "mysql_select_db() sirvió<br />
<br />" );<br />
else<br />
{<br />
echo( "mysql_select_db() NO sirvió<br />
</p>" );<br />
mysql_close( $conn );<br />
require_once( "incPie5.php" );<br />
exit( 1 );<br />
}<br />
echo( "</p>" );<br />
?><br />
</syntaxhighlight><br />
<br />
=== Explicación ===<br />
<br />
=== Descargarlo ===<br />
[http://www.linuxcabal.org/PHPClase/MySQLConnect.inc.txt Descargar el código de MySQLConnect.inc]<br />
<br />
<br />
[[Category:PHP]]<br />
[[Category:PHPCabal]]<br />
[[Category:CursoPHP]]</div>
Rrc