Jump to content

Matar

Members
  • Posts

    102
  • Joined

  • Last visited

Everything posted by Matar

  1. Matar

    end session

    hi man .. thnaks for this useful replay the login i make is for students to show there marks ( my site is for my college)so , i am not very well in asp but this my code in log page :********<html><head><meta http-equiv="Content-Language" content="en-us"><meta http-equiv="Content-Type" content="text/html; charset=windows-1256"></head><body bgcolor="#BDCEE1"><center><%user=Request.form("user")pass=Request.form("pass")if user = "" then Response.Redirect("error.asp?error=name_null")elseif pass = "" thenResponse.Redirect ("error.asp?error=pass_null")end if end if Dim conn Dim rs Set Conn = Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open(Server.Mappath("/webdata/log.mdb"))set rs = Server.CreateObject("ADODB.recordset") sql= "SELECT * FROM stu WHERE user = '" & Request.Form("user") & "' and pass = '" &Request.form("pass")&"'" set RS = Conn.Execute(SQL)if rs.eof then response.Redirect ("error.asp?error=Name_Entry")elseif rs("pass") <> pass then response.Redirect ("error.asp?error=pass_Entry") end ifend if%><table border="1" width="100%"><tr><%for each x in rs.Fields%> <% if x.value <>"" then%> <%response.write("<th>" & x.name & "</th>")%> <%end if%><%next%></tr> <%do until rs.EOF%> <tr> <%for each x in rs.Fields%> <% if x.value <>"" then%> <td> <%Response.Write(x.value)&"<br/>"%></td> <%end if%> <%next rs.MoveNext%> </td> <% loopRS.CloseSet RS = nothingConn.CloseSet Conn = nothingsession.abandon%></table></center></body></html>***** if you have any useful idea to this code plz tell me about it thanks
  2. Matar

    end session

    hi i face a big big big problem which is when a user login to his account and press a back button he will back to the home page after that when he press in the forward button he will back to his account so how i can prevent him from this
  3. hi thnak u man for replay but i cant detrmaine which fields i want , because every user have his data the problem i face i store the username and pass and other data when the user login to his account the login page will retreve the username and pass and the other data . i wanna to prevent the login to get the user and pass and show other data by for each statment
  4. hi i use for each statment to get the values of recored in access db so for example if there are a recored contain 6 fields how can i get 4 fields with for each statment
  5. thnak u for ur replay , i detrmine the problem and fix it thanks man
  6. i am trying to make regestration page to my website , the problem is when i press the submit button i see this errorADODB.Recordset (0x800A0CC1)Item cannot be found in the collection corresponding to the requested name or ordinal.i make the html form with frontpage 2003 , and the add.asp page on notpad and this the code for add.asp page********<html><body><%Dim conn Dim rs Set Conn = Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open(Server.Mappath("/webdata/atc.mdb"))set rs = Server.CreateObject("ADODB.recordset") RS.open "reg",Conn,2,2rs.AddNewrs.Fields("Name") = Request.Form("name")rs.Fields("avg_sec") = Request.Form("avg_sec")rs.Fields("sec_sec") = Request.Form("sec_sec")rs.Fields("avg_year") = Request.Form("avg_year")rs.Fields("sec_sou") = Request.Form("sec_sou")rs.Fields("sec_sou") = Request.Form("sec_sou")rs.Fields("last_sch") = Request.Form("last_sch")rs.Fields("gen") = Request.Form("gen")rs.Fields("mat_stu") = Request.Form("mat_stu")rs.Fields("rel") = Request.Form("rel")rs.Fields("pob") = Request.Form("pob")rs.Fields("dob") = Request.Form("dob")rs.Fields("moth_name") = Request.Form("moth_name")rs.Fields("nat") = Request.Form("nat")rs.Fields("org_cou") = Request.Form("org_cou")rs.Fields("addressl") = Request.Form("address")rs.Fields("tel") = Request.Form("tel")rs.Fields("post_add") = Request.Form("post_add")rs.Fields("po") = Request.Form("po")rs.Fields("dad_name") = Request.Form("dad_name")rs.Fields("dad_job") = Request.Form("dad_job")rs.Fields("dad_rela") = Request.Form("dad_rela")rs.Fields("dad_name") = Request.Form("dad_name")rs.Fields("work_un") = Request.Form("work_un")rs.Fields("unjob_no") = Request.Form("unjob_no")rs.Fields("flag_serv") = Request.Form("flag_serv")rs.Fields("flagserv_no") = Request.Form("flagserv_no")rs.Fields("wh_card") = Request.Form("wh_card")rs.Fields("wh_so") = Request.Form("wh_so")rs.Fields("shg") = Request.Form("flag_serv")rs.Fields("flag_serv") = Request.Form("flag_serv")rs.Fields("any_un") = Request.Form("flag_serv")rs.Fields("any_name") = Request.Form("flag_serv")rs.Fields("any_cen") = Request.Form("flag_serv")rs.Updaters.CloseSet rs = NothingSet Conn = NothingResponse.Redirect "a.asp"%></body></html>****and i check the fields name in the form and in the database records and thanks for all matar
  7. hi i want to post the checkbox value to my access db , and i check the recored in the db for yes or no , please sent to me a small example for checkbox and radiothank you
  8. hi i have a college website , i want to add the students marks to the site , so there are many Specialaization and every Specialaization have a certain subjects so how can i show every student his mark when he enter the user name and the password . i tryed to make more than table ,every Specialaization have a table and there one table for usres and pass but i cant retrive any data from these table what is sql command which can i use please help me
  9. thank u for this useful article ,i work in a college web site ,so they need a database to store the student marks to be the student able to show there marks on the internet , so , i make the login script but the problem is there are many Specializations and every Specialization have a certain subject to studies ,how i can divide every Specializations students when they are enter the user name and the password ?thank u
  10. thank u for ur help , i want to ask you about post html form value to access DB , i am trying that , and its wok propably with <input = "text"> when i need to post the <input="radio" or "checkbox"> i have the following error "type mismatch" ,and i check the db feild thats it yes or no value , if u can help me , please write a simple code thank u
  11. i witre the following code , this code is login code ,so when the user enter the user name correctly he will go to his information , the problem is when entering a invlaide user name , he go to the same page but with no information , i need to code ,thats redirect the user to anthor page :this is the code ::***<html><body><center> <table width="30%" cellspacing="0" cellpadding="2" border="1" > <tr> <th bgcolor = "yellow">name</th> <th bgcolor = "yellow">age</th> <th bgcolor = "yellow">address</th> </tr><%Dim conn Dim rs Set Conn = Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open(Server.Mappath("/webdata/it.mdb"))set rs = Server.CreateObject("ADODB.recordset") sql= "SELECT * FROM samer WHERE user = '" & Request.Form("name") & "'"set RS = Conn.Execute(SQL)DO While NOT RS.EOF response.write("<td>" & rs.fields("name") & "</td>") & "<BR>" response.write("<td>" & rs.fields("age") & "</td>") & "<BR>" response.write("<td>" & rs.fields("address") & "</td>") & "<BR>" RS.MoveNextLoop RS.CloseSet RS = nothingConn.CloseSet Conn = nothing%></center></body></html>
  12. Matar

    form validation

    hi to check the error in the form , you can use java script code , you can find it in www.hotscripts.comto insert data into database via html form , use this code , but this code use DNS Connection , so its dosent use ODBC Setting ********a.aspHTML Form code<html><head><title>test</title></head><body bgcolor="white" text="black"> <form name="form" method="post" action="add.asp"> Name: <input type="text" name="name" > <br> Comments: <input type="text" name="com"><br> <input type="submit" name="Submit" value="Submit"> </form> </body></html>*****add.asp page code <html><body><%Dim conn Dim rs Dim strSet Conn = Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open(Server.Mappath("/webdata/it.mdb"))set rs = Server.CreateObject("ADODB.recordset") RS.open "samer",Conn,2,2rs.AddNewrs.Fields("Name") = Request.Form("name")rs.Fields("Com") = Request.Form("com")rs.Updaters.CloseSet rs = NothingSet Con = NothingResponse.Redirect "a.asp"%></body></html>
  13. hi thank you man for your reply i was trying the code that you write , but when i run the page , there is nothingto show in the page , the result is clear page . this the code ***********<html><body><%Dim conn Dim rs Dim strdim namedim passname = request.form("name")pass = request.form("pass")Set Conn = Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open(Server.Mappath("/webdata/it.mdb"))set rs = Server.CreateObject("ADODB.recordset") sql= "SELECT * FROM samer WHERE (name ='" & uname & "') AND (pass ='" & pwd & "')" set RS = Conn.Execute(SQL)DO While NOT RS.EOF Response.Write RS("age") & "<BR>" Response.Write RS("address") & "<BR>" RS.MoveNextLoop RS.CloseSet RS = nothingConn.CloseSet Conn = nothing%></body></html>*****html code :<html><head><title>test</title></head><body bgcolor="white" text="black"> <form name="form" method="post" action="log.asp"> Name: <input type="text" name="name" > <br> Comments: <input type="password" name="pass"><br> <input type="submit" name="Submit" value="Submit"> </form> </body></html>*****i dont use ODBC Setting To Connect My Database With ASP . What Is The Problem .
  14. hi thank you for your replay i very well in asp and ado , i can connect the database and store data in database by html form via asp , and i can show the contant of the database on web pagi have the SQL Statment To reteve The Data for example Select* where name = 'Joe' and pass = '596' look , here i define the user name and password , i dont need this i need Checking on user name & password entered In Html form . Thank YOU.
  15. hi i want to make a login page for the users , the users and there passwords stored in a MS-access database , so , i want to check the user name and the passwordwhich filled in html form .
  16. hi how can i get the data in the html form and post it to my mail plz help me .
  17. Matar

    Problem in ADO

    hi am try to add some rows to access database throw html form but i have one error " You Don't Have Perrmition To Write In The Database"am checked the lessonos on this website , and i find the answer and its "make a right click on .mdb file and choose prprites then go to security tab and makr the access right ."So , the problem is no secutity tab in the .mdb file . what is the selution ?* My ms-office version (ms-office XP)please help its very important for me . thnak you.
  18. Matar

    ASP Sending Mail

    hi, i think you must make a page that contain a form to fill the data in the form . 1 - you must make a page with exction .asp , that contain a form . when you are press submit , you must redirect to the page thats contain the sending mail via CDO . 2 - in the form page , you must use a form method "post" . ***************GOOD LUCKMaTar
  19. hi , thx all for ur help Matar
  20. i have a problem when i connecting asp with ms-access and the problem in the include file code<!--include file = "adovbs.inc"-->in the explorer page apper ( this file not found)................... am writinf the following code ..................<--!include file = "adovbs.inc"--><html dir = "rtl"><body><%dim cnset cn = server.createobject("ADODB.connection")cn.connectionstring = "provider = microsoft.jet.OLEDB.4.0;data source = "& servermappath("matar.mdb")cn.opendim rs set rs = server.createobject("ADODB.recordset")rs.open "select * from matar",cn,adopenstatic,aslockoptimisticwhile NOT rs.EOFresponse.write rs("firstname")&"<br/">rs.movenextwend%></body></html>......................................commentsMy OS : XP P2My ms-Office is : office XPThe Name Of The database is : samer.mdb (stored in C drive)i cant resolve this problem please help me
×
×
  • Create New...