<%
if eliminar1 then
response.write("hola")
else
%>
<html>
<head>
<title>Pruebas</title>
</head>
<body>
<H1>CONTENIDO DE LA BASE DE DATOS</H1>
<%
Dim oConn,strSQL, objRS
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("ejemplo.mdb"))
strSQL = "SELECT id, Nombre, apellido, telefono, direccion, email FROM prueba order by nombre"
Set objRS = oConn.Execute(strSQL)
%>
<form method="post" action="eliminar.htm">
<TABLE BORDER=1 CELLSPACING=1 CELLPADDING=1 width="732">
<TR >
<TD height="23" width="124" valign="top" bgcolor="#0066FF">
<div align="center"> Nombre</div>
</TD>
<TD valign="top" width="115" bgcolor="#0066FF">
<div align="center"> Apellido </div>
</TD>
<TD width="125" valign="top">
<div align="center"> Télefono</div>
</TD>
<TD width="128" valign="top">
<div align="center"> Dirección</div>
</TD>
<TD width="140" valign="top">
<div align="center"> E-mail</div>
</TD>
<td width="67" valign="top"> Eliminar</td>
</TR>
<%
dim a
a=0
while (not objRS.Eof)
a=a+1
if colorfila = 1 then
color= "#DEDEBE"
colorfila=0
else
color="#F0F0F0"
colorfila=1
end if
Response.Write("<tr><td bgcolor='"&color&"'> " & objRS("Nombre") & "</td><td bgcolor='"&color&"'> " & objRS("Apellido") & " </td><td bgcolor='"&color&"'> " & objRS("telefono") & "</td><td bgcolor='"&color&"'> " & objRS("direccion") & "</td><td bgcolor='"&color&"'> " & objRS("email") & "</td><td><input type=checkbox name=eliminar[] value ="& objRS("id") &" ></tr>")
'Response.Write("<input type=checkbox name=eliminar[] value= & objRS(id) & >")
objRS.MoveNext
wend
' response.write(a)
oConn.Close
set objRS = nothing
set oConn = nothing
%>
</table>
<table width="732" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="656" height="39"></td>
<td width="76" valign="top">
<input type=submit name="eliminar1" value=Eliminar></td>
</tr>
</table>
</form>
</body>
</html>
<%
end if
%>
