h2q1
02-28-2007, 10:03 PM
I have a function as follow:
<!--#include file="connection.asp"-->
<%
sub check()
openConn
set rs=Server.CreateObject("ADODB.Recordset")
sqlText = "SELECT username FROM tblUser"
rs.open sqltext, oConn
rs.Movefirst
Do While not rs.EOF
if request.Form("username") = rs("username") then
response.Redirect("admin_modify.asp")
end if
rs.MoveNext
Loop
end sub
%>
I have a form with :
+ 1 textbox to enter username (name of textbox is username)
+ 2 button is : modify and delete
example with button number 1 :
<input type="button" name="modify" value="modify" onClick="<%call check()%>"
then i run this page, with any data entered, I clicked modify button but it didn't work(nothing happens)...my form have action = "" !
(seriously, when I enter data that have in Database into textbox then press Enter immediately, page admin_modify.asp open ! why? )
somebody help me :(
<!--#include file="connection.asp"-->
<%
sub check()
openConn
set rs=Server.CreateObject("ADODB.Recordset")
sqlText = "SELECT username FROM tblUser"
rs.open sqltext, oConn
rs.Movefirst
Do While not rs.EOF
if request.Form("username") = rs("username") then
response.Redirect("admin_modify.asp")
end if
rs.MoveNext
Loop
end sub
%>
I have a form with :
+ 1 textbox to enter username (name of textbox is username)
+ 2 button is : modify and delete
example with button number 1 :
<input type="button" name="modify" value="modify" onClick="<%call check()%>"
then i run this page, with any data entered, I clicked modify button but it didn't work(nothing happens)...my form have action = "" !
(seriously, when I enter data that have in Database into textbox then press Enter immediately, page admin_modify.asp open ! why? )
somebody help me :(