Jump to content

Belzar

Members
  • Posts

    37
  • Joined

  • Last visited

Belzar's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Great it does work, it just doesnt look like it does inside dreamweaver... thanks for all the help
  2. What I am trying to do is make it so you can copy the code from my page and put it on myspace comments... I hate to show this, cuz its a lil vulgar or bad, but the thing i want to be able to use this for is at http://droppingthebomb.com/ecards/######/pony2.htm when i put the code inside the box, it looked like it was just showing it as it would on the web page, but i didnt upload it to try cuz i didnt think it would work... it looked something like this:<textarea><font color='FF0066' size='7'>Don't mind me,<br><a href='http://droppingthebomb.com'><embed img src='http://droppingthebomb.com/gfx/tampon.jpg'></a><br>I'm riding the cotton pony.</font></textarea>
  3. Hi everyone, I am trying to make a <textarea> with code inside of it on my website, like they have here, and I know I have seen it on other sites. When I do it on my site, it always just runs the code, it will not let me just have the code so I can show what certain codes are... Can anyone help me please?
  4. I remember a long while back, i always saw some one mention a space where you could get a free website from an asp host... can someone tell me where to go for that please
  5. hi, this seems to be the same question i asked and was replied with an answer that worked great by Yahweh i think it was... this is the code and it works perfectly, also can see it under my post on this page last i looked called Password protecting pages... this is actually just copied from there <%Dim strPasswordstrPassword = request("password")if Password = "baby" then%> The rest of your page contents should go here.<%else%> <form action="<%=Request.ServerVariables("SCRIPT_NAME")%>" method="post"> What's the password:<br> <input type="password" name="password"> <p> <input type="Submit" value="Go!"> </p> </form><%end if%> You can make the password whatever you want to with line number 5
  6. Hey, I guess what I mean is a Visual Studio type program... I used Dreamweaver on Windows so I could do the graphics and all... Now, besides the text editor I am not sure what to use to do this.
  7. Hi, before when I was writing asp I was using Windows Operating System, I recently swiched back to Linux OS and I am having trouble writing asp using it. I am using the program called Nvu and it seems to only make HTML files. If there is anybody here that uses Linux and knows a good program that will help me, please reply and let me know. Thanks a lot.
  8. Nevermind, I finally got it working.. thanks for all the help
  9. Hey again, I am still having trouble with this code. It is like I get it so close to working then I run into another problem. Atleast now I am using a browser that lets me see where the error is, before it wouldnt tell me. I copied the code just to try to make it work and it is telling me that the ODBC Driver does not support this action. Here is the code. <% Option ExplicitFunction SQLSecurity(myStr) 'This eliminates the risk of SQL injection SQLSecurity = Replace(myStr, "'", "''", 1, -1, vbBinaryCompare)End FunctionDim Username, PasswordUsername = cstr(request("username")) 'the cstr function explicitly casts thePassword = cstr(request("Password")) 'variable as a string.'Validating username and password.If Username = "" then response.redirect "signup.asp?msg=Invalid username."elseif Password = "" then response.redirect "signup.asp?msg=Invalid password.&username=" & username'elseif Len(username) < 3 then 'this checks to see that the username at least 3' 'characters long' response.redirect "signup.asp?msg=Username must be at least" & _' "3 characters long.&username=" & username'elseif Len(password) < 3 then 'this checks to see that the password at least 3' 'characters long' response.redirect "signup.asp?msg=Password must be at least" & _' "3 characters long.&username=" & usernameEnd ifelseif Len(username) > 25 then response.redirect "signup.asp?msg=Username cannot be longer than" & _ "25 characters.&username=" & usernameelseif Len(password) > 25 then response.redirect "signup.asp?msg=Password cannot be longer than" & _ "25 characters.&username=" & usernameEnd if'I've commented out the minimum username and password validations. Just'remove the apostrophes before the appropriate lines if you want to use those'validations.Dim Conn, RS, SQL, Successful, DSNNameDSNName = "PROVIDER=MSDASQL;driver={MySQL ODBC 3.51 Driver};server=mysql14.ixwebhosting.com;option=18475"Set Conn = Server.CreateObject("ADODB.Connection")Set RS = Server.CreateObject("ADODB.RecordSet")Conn.Open DSNNameSQL = "Select Username, Password, IPAddress, Email, DateRegistered FROM Users WHERE " & _ "Username = '" & SQLSecurity(Username) & "' Limit 1;"RS.Open SQL, Conn, 3, 3 'This is line number 48, where the error is occuring If RS.EOF then 'RS.EOF means no results returned from the SQL query. In this case, since 'no results were returned the query executed above, then it means there 'is no user in the Users table with the same username. So, we can insert the 'new username. 'Adding new account to the Users table RS.AddNew RS("Username") = Username RS("Password") = Password RS("IPAddress") = Request.ServerVariables("REMOTE_ADDR") RS("DateRegistered") = Now RS.Update 'Setting cookies for the user. These cookies will expire in 1 year. Response.Cookies("account")("username") = Username Response.Cookies("account")("password") = Password Response.Cookies("account").Expires = DateAdd("m", 12, Now()) Successful = True else 'If a result is found for the query above, that means a user already exists 'with the chosen username, so we have to forward the user back to the 'signup page and ask him or her to choose another name. Successful = False End ifRS.CloseConn.CloseSet Conn = nothingSet RS = nothingIf Successful = True then%> <html> <body> <h1>Congrats!</h1> <p>Your account has been successfully created, <%=Request.Cookies("account")("username")%> :)</p> <p>Please go back to the <a href="default.asp">home page</a>, or for free to edit your <a href="profile.asp">profile</a>.</p> </body> </html><%else response.redirect "signup.asp?msg=Username is already taken." & _ "&username=" & usernameEnd if%> I, of course took out the user, password and database name... but, this is the error it is giving me. I do not know why it is not working, please help me again Thanks.
  10. Belzar

    The signup.asp pages

    I would, it is just that I dont get an error strangely enough. ill check out line 27, thanks.
  11. Hi, I have been trying this code and I cant figure out. Yahweh, I have tried the code you gave me, and I havent gotten it to work. The statement in it that verifies the password and username seems to make it so its not in ASP code anymore for some reason, so I took that out. It still isnt working thought.. here is my code: <% Option ExplicitFunction SQLSecurity(myStr) SQLSecurity = Replace(myStr, "'", "''", 1, -1, vbBinaryCompare)End FunctionDim Username, PasswordUsername = cstr(request("username"))Password = cstr(request("password"))If Username = "" then response.redirect "signup.asp?msg=Invalid username."Elseif Password = "" then response.redirect "signup.asp?msg=Invalid password.&username=" & Username End IFDim Conn, RS, SQL, SuccessfulSet Conn = Server.CreateObject("ADODB.Connection")Set Conn = Server.CreateObject("ADODB.Recordset")SQL = "Select Username, Password, IPAddress, Email, DateRegistered FROM Users Where " & _ "Username = '" & SQLSecurity(Username) & "' Limit 1;" Conn.Open connection_ stringRS.Open SQL, Conn, 3, 3 If RS.EOF then RS.Addnew RS("Username") = Username RS("Password") = Password RS("IPAddress") = Request.ServerVariables("Remote_Addr") RS("DateRegistered") = Now RS.Update Response.Cookies("account")("Username") = Username Response.Cookies("account")("Password") = Password Response.Cookies("account").Expires = DateAdd("m", 12, Now()) Successful = TrueElse Successful = FalseEnd IfRS.CloseConn.CloseSet Conn = NothingSet RS = NothingIf Successful = True then%> <html> <body> <h1 align="center">Congrats!</h1> <p>Your account has been successfully created, <%=Request.Cookies("account")("username")%> :)</p> <p>Please go back to the <a href="default.asp">Home Page</a>, or you can edit your <a href="profile.asp">Profile</a>.</p> </body> </html><%Else response.redirect "signup.asp?msg=Username is already taken." & _ "&username=" & usernameEnd If%> I will show you the link again, maybe there is another error that I am not seeing. Sign upPlease help, I dont know what it is thats not letting it work
  12. I started learning php a little while ago, I know very little. I already have a website, and I use MySql as my database. I started learning php here on the tutorials, but I am not so sure it answers my question. I dont know how to write the code for a signup.php page still even though I know a small amount of it. Basically the only code I have written in php was what I learned here on this site.
  13. Hello all,I have been trying to get a signup.asp page and a signin page. I was unsuccessful at using it for some reason and it didnt work even after I reposted my problem, I ran into problem after problem. My point is, I figured I would try this in php code. Is there anybody that could help me out with writing a signup.php code. maybe some examples or even some other ideas.Thanks a lot
  14. I am never the ones with answers... but, in line 9 it saysif(bunny) then... you wouldnt need the () and if bunny what? it doesnt know what you are saying i think.But, like i said, i am not one with all the answers.. but it doesnt seem to make any since to me, not trying to be mean or anything. Since you are using Bunny as a variable, you shouldnt need to use the () and your not telling it anything.
  15. My problem is, when I use the exact code with my connection string, it says that the page cannot be displayed. Last time I sent a reply with a link and telling my problem, I some how fixed it before you even looked. So, ill show you the code that I am using and I will show you the link to it at the same time. <% Option ExplicitFunction SQLSecurity(myStr) 'This eliminates the risk of SQL injection SQLSecurity = Replace(myStr, "'", "''", 1, -1, vbBinaryCompare)End FunctionDim Username, PasswordUsername = cstr(request("username")) 'the cstr function explicitly casts thePassword = cstr(request("Password")) 'variable as a string.'Validating username and password.If Username = "" then response.redirect "signup.asp?msg=Invalid username."elseif Password = "" then response.redirect "signup.asp?msg=Invalid password.&username=" & username'elseif Len(username) < 3 then 'this checks to see that the username at least 3' 'characters long' response.redirect "signup.asp?msg=Username must be at least" & _' "3 characters long.&username=" & username'elseif Len(password) < 3 then 'this checks to see that the password at least 3' 'characters long' response.redirect "signup.asp?msg=Password must be at least" & _' "3 characters long.&username=" & usernameEnd ifelseif Len(username) > 25 then response.redirect "signup.asp?msg=Username cannot be longer than" & _ "25 characters.&username=" & usernameelseif Len(password) > 25 then response.redirect "signup.asp?msg=Password cannot be longer than" & _ "25 characters.&username=" & usernameEnd if'I've commented out the minimum username and password validations. Just'remove the apostrophes before the appropriate lines if you want to use those'validations.Dim Conn, RS, SQL, SuccessfulSet Conn = Server.CreateObject("ADODB.Connection")Set Conn = Server.CreateObject("ADODB.RecordSet")SQL = "Select Username, Password, IPAddress, Email, DateRegistered FROM Users WHERE " & _ "Username = '" & SQLSecurity(Username) & "' Limit 1;Conn.Open "PROVIDER=MSDASQL;driver={MySQL ODBC 3.51 Driver}" & _"server=mysql14.ixwebhosting.com" & _"option=18475" & _"uid=scourge_scourge;pwd=mypass;database=scourge_Data"RS.Open SQL, Conn, 3, 3 If RS.EOF then 'RS.EOF means no results returned from the SQL query. In this case, since 'no results were returned the query executed above, then it means there 'is no user in the Users table with the same username. So, we can insert the 'new username. 'Adding new account to the Users table RS.AddNew RS("Username") = Username RS("Password") = Password RS("IPAddress") = Request.ServerVariables("REMOTE_ADDR") RS("DateRegistered") = Now RS.Update 'Setting cookies for the user. These cookies will expire in 1 year. Response.Cookies("account")("username") = Username Response.Cookies("account")("password") = Password Response.Cookies("account").Expires = DateAdd("m", 12, Now()) Successful = True else 'If a result is found for the query above, that means a user already exists 'with the chosen username, so we have to forward the user back to the 'signup page and ask him or her to choose another name. Successful = False End ifRS.CloseConn.CloseSet Conn = nothingSet RS = nothingIf Successful = True then%> <html> <body> <h1>Congrats!</h1> <p>Your account has been successfully created, <%=Request.Cookies("account")("username")%> :)</p> <p>Please go back to the <a href="default.asp">home page</a>, or for free to edit your <a href="profile.asp">profile</a>.</p> </body> </html><%else response.redirect "signup.asp?msg=Username is already taken." & _ "&username=" & usernameEnd if%> And this is the link to it: Signup hereI, trying to do it exactly correct, copied and pasted it and put my connection string in it to see if that would work, and its always the same thing. Anything I did?
×
×
  • Create New...