Ver Mensaje Individual
  #2 (permalink)  
Antiguo 22/08/2008, 13:39
Avatar de fcdragons
fcdragons
 
Fecha de Ingreso: agosto-2008
Ubicación: echo $_REQUEST['ubicacion'];
Mensajes: 474
Antigüedad: 15 años, 8 meses
Puntos: 13
Respuesta: Ayuda al procesar un formulario

Y este se llama subetutorial.php que es donde esta el formulario y todo:

Código PHP:
<!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>TE.com .::TutorialesErik.com::. una web para aprender disfrutando.</title>
<style type="text/css">
input {
   border:1px solid #666666;
}
</style>

<style type="text/css">
.MainNav a:hover {
   color:#333333;
   background-color:#CCCCCC;
}

.MainNav a:visited {
   color:#999999;
}

.MainNav a:link {
   color:#999999;
}
</style>

<style type="text/css">
body {
   text-align:center;
   min-width:760px;
}

#wrapper {
   width:720px;
   text-align:left;
   margin:0 auto;
}

#content {
   width:560px;
   float:right;
}

#content h1, #content h2, #content p {
   padding-right:20px;
   padding-left:20px;
}

#mainNav {
   width:150px;
   float:left;
}

#footer {
   clear:both;
}


</style>

<script language="JavaScript">
function validar(form) { //verifica que haya llenado los campos
if (!form.nombre.value) {
alert("Debe completar el campo de Tu Nombre!");
return (false)
} else if (!form.email.value) {
alert("Debe completar el campo Tu Email!");
return (false)
} else if (!form.tutorial.value) {
alert("Debe completar el campo Aqui Tu Tutorial!");
return (false)
} else { 
return (true)
}
}
</script>

</head>

<body link="#666666" vlink="#666666" alink="#666666">
<div id="wrapper">
<div id="branding">
<table width="720" border="0" cellpadding="0" cellspacing="0">
<tr>
<td background="enc.png" height="100"></td>
</tr>
</table>
</div>
<div id="content">
<div id="mainContent">
<table width="560" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="30"><img src="welcomenav.png" /></td>
</tr>
<tr>
<td background="fondocon1.png" height="30"><center></center></td>
</tr>
<tr>
<td background="fondocon2.png" height="30"><center>
<form method="post" action="phpsubirtutorial.php" onSubmit="return validar(this)" name="formtutoriales">
<table cellpadding="0" cellspacing="0" border="1" bordercolor="#999999">
<tr>
<td>Tu nombre: </td><td><input type="text" name="nombre" id="nombre" size="42" /></td>
</tr>
<tr>
<td>Tu email: </td><td><input type="text" name="email" id="email" size="42" /></td>
</tr>
<tr>
<td>Tutorial: </td><td><textarea name="tutorial" cols="40" rows="50" id="tutorial"></textarea></td>
</tr>
</table>
<input type="submit" value="enviar formulario" />
</form>
</center></td>
</tr>
<tr>
<td height="30" background="fondocon3.png"></td>
</tr>
<tr>
<td background="welcomenav2.png" height="30"></td>
</table>
</div>
</div>
<div id="mainNav" class="mainNav">
<table cellpadding="0" cellspacing="0" border="0" bordercolor="#000000" width="150" align="center">
<tr>
<td background="tutorialesnav.png" width="150" height="30"></td>
</tr>
<tr>
<td bgcolor="#0066FF" width="150" height="30" background="fondonav1.png"><center><a href="/tutorialesphp.php">PHP</a></center></td>
</tr>
<tr>
<td bgcolor="#0066FF" width="150" height="30" background="fondonav2.png"><center><a href="/tutorialesmysql.php">MySql</a></center></td>
</tr>
<tr>
<td bgcolor="#0066FF" width="150" height="30" background="fondonav2.png"><center><a href="/tutorialescss">CSS</a></center></td>
</tr>
<tr>
<td bgcolor="#0066FF" width="150" height="30" background="fondonav2.png"><center><a href="/tutorialeshtml.php">HTML</a></center></td>
</tr>
<tr>
<td bgcolor="#0066FF" width="150" height="30" background="fondonav2.png"><center><a href="/tutorialesjavascript.php">JavaScript</a></center></td>
</tr>
<tr>
<td bgcolor="#0066FF" width="150" height="30" background="fondonav2.png"><center><a href="/tutorialesphotoshop.php">Photoshop</a></center></td>
</tr>
<tr>
<td bgcolor="#0066FF" width="150" height="30" background="fondonav2.png"><center><a href="/tutorialesflash.php">Flash</a></center></td>
</tr>
<tr>
<td bgcolor="#0066FF" width="150" height="30" background="fondonav2.png"><center><a href="/tutorialesfireworks.php">Fireworks</a></center></td>
</tr>
<tr>
<td bgcolor="#0066FF" width="150" height="30" background="fondonav2.png"><center><a href="/tutorialesaftereffects.php">After Effects</a></center></td>
</tr>
<tr>
<td bgcolor="#0066FF" width="150" height="30" background="fondonav3.png"><center><a href="tutorialesdreamweaver.php">Dreamweaver</a></center></td>
</tr>
<tr>
<td background="tutorialesnav2.png" width="150" height="30"></td>
</tr>
</table>
<p>
<br />
<p>
<table width="150" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td background="lawebnav.png" height="30"></td>
</tr>
<tr>
<td width="150" height="30" background="fondonav1.png"><center><a href="/sugerencias.php">Envia una sugerencia</a></center></td>
</tr>
<tr>
<td width="150" height="30" background="fondonav2.png"><center><a href="/index.php">Home</a></center></td>
</tr>
<tr>
<td width="150" height="30" background="fondonav2.png"><center><a href="mailto:[email protected]">Contacta conmigo</a></center></td>
</tr>
<tr>
<td width="150" height="30" background="fondonav2.png"><center>Foro tutoriales</center></td>
</tr>
<tr>
<td width="150" height="30" background="fondonav3.png"><center><a href="/subetutorial.php">Subir un tutorial</a></center></td>
</tr>
<tr>
<td background="tutorialesnav2.png" height="30"></td>
</tr>
</table>
<p>
<br />
<p>
<table width="150" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td background="loginnav.png" height="30"></td>
</tr>
<tr>
<td width="150" height="30" background="fondonav1.png"></td>
</tr>
<tr>
<td width="150" height="30" background="fondonav2.png"><center><?
if(!$_COOKIE[uid]) {
?>
<form method="post" action="entrar.php">
<b>Nick:</b><br>
<input type="text" name="nick" maxlength="20" size="10"><br>
<b>Contrase&ntilde;a:</b><br>
<input type="password" name="contrasena" maxlength="20" size="10"><br><br>
<input type="submit" name="enviar" value="Iniciar Sesion">
</form>
<p><a href="registrar.php">Registrarse</a> | 
<?
}
else {
?>
Bienvenid@ <b><?=$_COOKIE[unick]?></b><br><br>
<br>
<a href="salir.php">cerrar sesion</a>
<?
}
?> </center></td>
</tr>
<tr>
<td width="150" height="30" background="fondonav3.png"></td>
</tr>
<tr>
<td background="tutorialesnav2.png" height="30"></td>
</tr>
</table>
</div>
<div id="footer">
</div>
</div>
</body>
</html>

Espero que puedan ayudarme, ya que vosotros entienden de esto, muchas gracias de antemano bye