mm no se que estoy haciendo, pero algo esta mal
intente hacer esto, aver que tal
Código PHP:
<!-- #include file="../conexion.asp"-->
<%
function grabar(sistema,nombre,linea)
call conectarDB
sSQL = "Insert into DS_sistemas(sistemas_id, sistemas_nombre, sistemas_linea) VALUES('"& sistema &"','"& nombre &"','"& linea &"')"
cnn.Execute(SSQL)
call desconectarDB
end function
function buscar()
call conectarDB
Dim sSQL, rs
sSQL = "Select sistemas_id, sistemas_nombre, sistemas_linea FROM DS_Sistemas where sistemas_id = '"& sistemas &"'"
Set rs = cnn.execute(sSQL)
call desconectarDB
end function
if request.servervariables("REQUEST_METHOD")="POST" and request.form("guardar")="guardar" then
call grabar()
else
%>
<!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=iso-8859-1" />
<title>Sistemas</title>
<script language="JavaScript" type="text/javascript">
<!--
function mostrarboton()
{
document.getElementById("guardar").style.visibility = "visible";
}
//-->
</script>
</head>
<body>
<div id="contenedor_pet">
<form method="post" action="sistemas.asp" id="form1" name="form1">
<table width="100%" cellpadding="0" cellspacing="0">
<tr><td>Número de Sistema: <br /><span class="dtobligatorio"> * </span>
<input name="sistemas" type="text" id="sistemas" value="" size="20" maxlength="20" onchange="mostrarboton()" /><!--onkeyup="javascript: location.href='sistemas.asp?strmostrar=1';" -->
<input name="ver" type="image" id="ver" value="Ver" src="Images/20_VER1.jpg" /><!-- onchange="buscar()" window.open('peticion.asp','gab','')--></td></tr>
<input type="hidden" value="buscar" name="metodo">
<tr><td>Nombre del sistema: <br /><span class="dtobligatorio"> * </span>
<input name="nombre" type="text" id="nombre" value="" size="95" maxlength="30" />
</td>
</tr>
<tr><td>Línea de sistemas:<br /><span class="dtobligatorio"> * </span>
<input name="linea" type="text" id="linea" value="" size="95" maxlength="30" /> </td></tr>
<tr><td><br /><br /></td></tr>
<tr><td>
<table align="left">
<tr>
<td width="167" height="36">
<div style=" visibility: hidden;"><input name="guardar" type="image" id="guardar" src="images/GUARDAR1.gif" onclick="guardar(sistema,nombre,linea)" />
<input name="guardar" type="hidden" id="guardar" value="1" />
</div>
</td>
<td width="167" height="36">
<div style=" visibility: hidden;"><input name="modificar" type="image" id="modificar" src="images/modificar1.gif" />
<input name="modificar" type="hidden" id="modificar" value="1" />
</div>
</td>
<td width="159">
<div style=" visibility: hidden;"><input name="borrar" type="image" id="borrar" src="Images/ELIMINAR1.gif"/></div></td>
<td width="72">
<div style=" visibility: hidden;"><a href="#" target="_blank" ><img src="images/IMPRIMIR1.gif" alt="Catalogo" name="imprimir" id="imprimir" width="113" height="32" border="0" /></a></div></td>
</tr>
<tr><td class="dtobligatorio"><br /><br />(*) Datos obligatorios</td></tr>
</table>
</td></tr>
</table>
</form>
</div>
</body>
</html>
<% end if%>
lo que intento hacer primero es habilitar el boton, lleno los campos y al darle click en boton guardar, que me llame a la funcion guardar() y que vaya y me inserte ese registro en la tabla, pero no lo hace =(
q puede ser?