Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Help in asp verification

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,3137
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> Help in asp verification
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Help in asp verification - 5/26/2005 10:41:48 PM   
  rhem

 

Posts: 1
Score: 0
Joined: 5/26/2005
From: Philippines
Status: offline
i'm having a difficulty in my asp codes because im just new in this asp, kindly help me...

<%

<!-- #INCLUDE FILE=C"\Program Files\Common Files\System\ado\adovbs.inc" -->


dim cn,rs
set cn = Server.CreateObject("ADODB.Connection")

cn.open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\inetpub\wwwroot\portal\database\portal.mdb;"

dim strsql

strsql = "Insert into tblreg values('" &request.form("lname") & "', '" & request.form("fname") & "', '" & request.form("mi") & "', '" & request.form("age") & "', '" & request.form("bdate") & "', '" & request.form("address") & "' , '" & request.form("course") & "', '" & request.form("year") & "', '" & request.form("section") & "', '" & request.form ("studno") & "', '" & request.form ("username") & "','" & request.form("password")& "')"



cn.execute strsql



%>
<Script language = "JavaScript">
<!--
function VerifyData()
{
if (register.form1.password.value != register.form1.Verify.value)
{
alert("Your password do not match - please reenter");
return false;
}
else
return true;
}
-->
</Script>

// the first script was running but when it comes to javascript i dont know where i should place it so it can verify my data... i need your suggestion this will be a big help for me thanks...

_____________________________

rhem
 
 
Post #: 1
 
 Re: Help in asp verification - 5/28/2005 2:29:35 AM   
  VBS

 

Posts: 110
Score: 0
Joined: 3/2/2005
From: Lebanon
Status: offline
Dear remedios,
First of all i advice u that use the RecordSet instead of SQL, cause it will be easier to read and can trap errors easily if any happens:

dim cn
dim rs
set cn=server.CreateObject("ADODB.Connection")
cn.ConnectionString "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\inetpub\wwwroot\portal\database\portal.mdb;"
cn.Open
cn.BeginTrans
set rs = server.CreateObject("ADODB.Recordset")
set rs.ActiveConnection =cn
rs.Open "SELECT * FROM tblreg",cn,2,3
cn.CommitTrans

rs.addnew
rs.fields("Field1")="Text1"
rs.update

Second, use an ASP/VBScript code to verify the registration, cause it can be easily bypassed if you use Javascript, and if u use JavaScript it might not work with some browsers cause many users are disableing the javascript on their computer cause it is like a secuirty breach.

Hope this helps

Best Regards
Firas S Assaad

(in reply to rhem)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> Help in asp verification Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts