Ver Mensaje Individual
  #4 (permalink)  
Antiguo 23/03/2004, 13:56
malpika
 
Fecha de Ingreso: marzo-2004
Ubicación: Extremadura
Mensajes: 92
Antigüedad: 20 años, 1 mes
Puntos: 0
para empezar gracias por el recibimiento :) y ahora pues vamos a ver el codigo.

1- Pagna HTML

<form name="form1" method="post" action="Registrado.asp">
<div align="left">
<p align="center"><font color="#C0C0C0" size="4">Para registrarte en la web
debes rellenar los siguientes campos</font></p>
<div align="center">
<table width="64%" border="0">
<tr>
<td width="8%" height="45"><font color="#C0C0C0">Nick:</font></td>
<td width="92%"><input name="Pass" type="text" id="Pass" size="25" style="background-color: rgb(100,100,100); color: rgb(196,196,196); cursor: default; font-family: Arial; font-size: 12px" rows=3 wrap=virtual>
&nbsp;</td>
</tr>
<tr>
<td height="52"><font color="#C0C0C0">Contrase&ntilde;a:</font></td>
<td><input name="Pass" type="password" id="Pass" size="25" style="background-color: rgb(100,100,100); color: rgb(196,196,196); cursor: default; font-family: Arial; font-size: 12px" rows=3 wrap=virtual></td>
</tr>
<tr>
<td height="41"><font color="#C0C0C0">Nombre:</font></td>
<td><input name="Nombre" type="text" id="Nombre2" size="25" style="background-color: rgb(100,100,100); color: rgb(196,196,196); cursor: default; font-family: Arial; font-size: 12px" rows=3 wrap=virtual></td>
</tr>
<tr>
<td height="41"><font color="#C0C0C0">Apellidos:</font></td>
<td><input name="Apellidos" type="text" id="Apellidos2" size="40" style="background-color: rgb(100,100,100); color: rgb(196,196,196); cursor: default; font-family: Arial; font-size: 12px" rows=3 wrap=virtual></td>
</tr>
<tr>
<td height="41"><font color="#C0C0C0">Edad:</font></td>
<td><select name="Edad" size="1" id="select" style="background-color: rgb(100,100,100); color: rgb(196,196,196); cursor: default; font-family: Arial; font-size: 12px" rows=3 wrap=virtual>
<option>menos de 16</option>
<option>16</option>
<option>17</option>
<option>18</option>
<option>19</option>
<option>20</option>
<option>21</option>
<option>22</option>
<option>23</option>
<option>24</option>
<option>25</option>
<option>26</option>
<option>27</option>
<option>28</option>
<option>29</option>
<option>30</option>
<option>31</option>
<option>32</option>
<option>33</option>
<option>34</option>
<option>35</option>
<option>36</option>
<option>37</option>
<option>38</option>
<option>39</option>
<option>40</option>
<option>mas de 40</option>
</select></td>
</tr>
<tr>
<td height="42"><font color="#C0C0C0">E-mail:</font></td>
<td><input name="Email" type="text" id="Email2" size="40" style="background-color: rgb(100,100,100); color: rgb(196,196,196); cursor: default; font-family: Arial; font-size: 12px" rows=3 wrap=virtual></td>
</tr>
<tr>
<td height="45"><font color="#C0C0C0">Ubicaci&oacute;n:</font></td>
<td><input name="Ubicacion" type="text" id="Ubicacion2" style="background-color: rgb(100,100,100); color: rgb(196,196,196); cursor: default; font-family: Arial; font-size: 12px" rows=3 wrap=virtual></td>
</tr>
<tr>
<td height="48"><font color="#C0C0C0">Firma: (*)</font></td>
<td><input name="Frase" type="text" id="Frase" size="50" style="background-color: rgb(100,100,100); color: rgb(196,196,196); cursor: default; font-family: Arial; font-size: 12px" rows=3 wrap=virtual></td>
</tr>
</table>
</div>
<p align="center"> (*) La firma que usted inserte servira para ponerla al
final de cada uno de los mensajes escritos</p>
<p align="center">&nbsp; </p>
<div align="center">
<table width="56%" border="0">
<tr>
<td width="47%"><div align="center"> <a href="registrado.asp" type="submit" target="derecha" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image1','','images/aceptar2.gif',1)">
</a><a href="registrado.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image3','','images/aceptar2.gif',1)"><img src="images/aceptar1.gif" name="Image3" width="80" height="31" border="0"></a><a href="registrado.asp" type="submit" target="derecha" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image1','','images/aceptar2.gif',1)">
</a></div></td>
<td width="53%"><div align="center"> <a href="registro.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image2','','images/borrar2.gif',1)"><img src="images/borrar1.gif" name="Image2" width="80" height="31" border="0"></a></div></td>
</tr>
</table>
</div>
<p>&nbsp; </p>
<p>&nbsp;</p>
</div>
</form>

ahi va el formulario entero, mucho codigo basura pero bueno, asi esta todo... y ahora vamos a pasar al codigo asp:


<body bgcolor="#000000" text="#CC0000">

<%
Set Conexion=Createobject("ADODB.Connection")
Conexion.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & server.mappath("/") & "\base.mdb;"
ordensql="Insert into Usuarios values ('" & request("Nick") & "','" & request("Pass") & "',null)"
set registros=conexion.execute(ordensql)

ordensql="Insert into Datos_Usuarios values ('" & request("Nick") & "','" & request("Nombre") & "','" & request("Apellidos") & "','" & request("Edad") & "','" & request("Email") & "','" & request("Ubicacion") & "','" & request("Frase") & "')"
set registros=Conexion.execute(ordensql)
%>
<p align="center">&nbsp;</p>
<p align="center"><font color="#408080" size="4"><u>Usuario Registrado correctamente</u></font></p>
<p align="center"><font color="#FFFFFF"> <u> </u></font></p>
<div align="center">
<table width="75%" border="0">
<tr>
<td width="41%"><font color="#408080">Su nombre de usuario es:</font></td>
<td width="59%"><font color="#CCCCCC"><u>
<% response.write(request("Nick")) %>
</u></font></td>
</tr>
<tr>
<td><font color="#408080">Su contrase&ntilde;a es:</font></td>
<td><font color="#CCCCCC"><u>
<% response.write(request("Pass")) %>
</u></font></td>
</tr>
</table>
<p>&nbsp;</p>
<p><font color="#C0C0C0">Gracias por registrarte, ya puedes acceder a la web.</font></p>
</div>
</body>


Pues esto es lo q hay y poniendo un boton submit funciona pero con la imagen no y no se por que... Saludos a todos!!!
__________________
Aupa Athletik!!!