Jump to content

Xenon Design

Members
  • Posts

    112
  • Joined

  • Last visited

Posts posted by Xenon Design

  1. The meta tags hold information for the search engine bots. The bots read the information and store it. When someone types in a keyword listed in one of your meta tags your website will be in the reuslts.You ca also use something called robots.txt to send information to search engine bots.For more information i suggest you read this tutorial by W3: http://www.w3schools.com/html/html_meta.asp

  2. I have seen alot of requests, not just on W3 for a login script. I will go step by step in showing how you set up a login script after you have set up your database.Login Script<IMPORTANT>To start off with you need a database with all your user information in it including username and password in a table called tblusers. Also a form with the input fields 'user' and 'pass'. Making sure the pass field is set to password to make the text *'s</IMPORTANT>

    <%'Checks for form dataIf Request.Form <>"" Then  'Set rs and connection to DB    Set conn = Server.CreateObject("ADODB.Connection")  Set rs = Server.CreateObject("ADODB.Recordset")    'Ill use a dsn named USERTEST to simulate a DSN connection to the database    dsn="dsn=USERTEST"  sql="SELECT * FROM tblusers WHERE username = '"&Request.Form("user")&"'"    'Executing connection    conn.Open dsn  rs.Open sql, conn  'If there is a username record    If Not rs.EOF Then      If rs.Fields.Item("password").Value = Request.Form("password") Then       'If the password is correct        Session("user") = rs.Fields.Item("username").Value        'Writes the user session        Response.Redirect("memberarea.asp")        'Redirects to a member area      Else        'If the password is incorrect        Response.Write("Password is incorrect")      End If  Else    'If no username record    Response.Write("Username does not exist")   End IfElse'If no form input'DISPLAY FORMEnd If%>

    This is a basic little code that will write a user session called "user" which can be written by writing

    <%=Session("user")%>

    So basically the script of logging in a user is just following: If username exists then -> check password -> if password is correct then login -> redirect to member areaOr if password is wrongIf username exists then -> check password -> if password is incorrect -> tell userExtra FeaturesIf your really good at ASP you will be able to change and complex-ify the code to visually show the password or username is incorrect by changing the input box to red via CSS or log the users IP address when they login or make a remember username cookie.If you want another tutorial on an extra feature please PM me and I will put one together. Also if you want a tutorial on another topic dont hezitate to PM me.Having problems with the script? Dont know how to do something?If you are having troubles with my script just reply with your problem and I will try to respond quickly. Also if theres any spelling mistakes just let me know and ill fix it :)Xenon Design :)

  3. This is the same sort of idea I use for my login script...ill make it blank and if you want more help just ask and I can fill it in

    'First find if there is any form informationIf Request.Form<>"" Then'If there is information thenResponse.write("Usernmae is:" & Request.Form("user"))Else'If no form informationRespnse.write("No Username inputted")End If

    Now if you want to make a login script you need to make a recordset and do alot of processing of the form data. If you want me to continue with the script just add me to your MSN (alex.xenondesign[at]gmail.com)

  4. Name: Alex EAlias: Xenon DesignExperience: ASP(1 year), HTML(4 years), CSS(3 years), Flash Actionscript(1 year), XML (3 months), Photoshop 6.0 (2 years)DOB: 25/10/1990Location: AustraliaGender: MaleHey guys. Ive used w3schools for along time now and just realised they had a forum. So im here to hopefully help anyone with ASP problems. In currently in the process of making my own ASP IPB. Just for my own use to start off with but then Ill make it avaliable to anyone. If you wanna chat to me on msn my email is: alex.xenondesign[at]gmail.com

×
×
  • Create New...