
14/08/2002, 11:30
|
 | | | Fecha de Ingreso: diciembre-2001
Mensajes: 5.286
Antigüedad: 23 años, 4 meses Puntos: 1 | |
Re: Grabar en campo vacio! <!--#include file="../setup.asp" -->
<%
Function Llenar(imagen,noticia)
set rs=server.createobject("adodb.recordset" )
rs.activeconnection=cn
sql="select * from noticias"
rs.open sql
set rt=server.createobject("adodb.recordset" )
rt.activeconnection=cn
if isnull(rs.fields("imagen")) then
sq="update noticias SET imagen='"&imagen&"' where id=" & noticia
rt.open sq
' rt.close
Exit Function
end if
if isnull(rs.fields("imagen2")) then
sq="update noticias set imagen2='"&imagen&"' where id=" & noticia
rt.open sq
' rt.close
Exit Function
end if
End FUnction
imagen=request.form("imagen")
noticia=request.form("noticia")
Llenar(imagen,noticia)
%>
Algo así...
<center>
<a href=http://comunidadguru.com><img border=0 src=http://comunidadguru.com/imagenes/logos/logo.gif></a>
</center> |