parte II.
archivo conexion.php
es una simple conexion a la bd.
Código PHP:
$cn = @mysql_connect("localhost","tu-usuario","clave") or die(mysql_error("Error de conexion."));
mysql_select_db("imagenes");
formulario agregar imagen.
Código HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Subir imagenes</title>
</head>
<body>
<form action="process.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
<table width="378" border="0" cellpadding="0" cellspacing="2">
<tr>
<td width="119">Nombres</td>
<td width="243"><input type="text" name="nombres" id="nombres" /></td>
</tr>
<tr>
<td>Apellidos</td>
<td><input type="text" name="apellidos" id="apellidos" /></td>
</tr>
<tr>
<td>Imagen</td>
<td><input type="file" name="imagen" id="imagen" /></td>
</tr>
<tr>
<td> </td>
<td><center><input type="submit" value="Agregar imagen" />
</center></td>
</tr>
</table>
</form>
</body>
</html>