Jump to content

pulpfiction

Members
  • Posts

    1,210
  • Joined

  • Last visited

Everything posted by pulpfiction

  1. This might be of some help...http://www.4guysfromrolla.com/webtech/021600-1.shtml
  2. Scott's code is working but not chocolate's. propably it needs the "return" from the function
  3. pulpfiction

    Format data

    Are you looking for somthing like thisDim d As Date d = Now Response.Write(d) Response.Write("<BR>") Response.Write(d.ToShortDateString) Response.Write("<BR>") Response.Write(d.ToLongDateString)OUTPUT:4/27/2006 12:04:17 PM4/27/2006Thursday, April 27, 2006
  4. pulpfiction

    Colours

    clear now. got confused.. sorry
  5. pulpfiction

    Colours

    I tried a simple HTML page somthing like this (browser: IE6)<html><body bgcolor=Gray></body></html>Changing <body bgcolor=Grey>I seem to get somthing like green. How come???
  6. pulpfiction

    Colours

    I think LG is correct, if you had used named colors then there is difference like "LightGrey - d3d3d" and "DarkGray - a9a9a9"
  7. In the bolded statement, next and set fo=nothing needs a space<%dim fs,fo,xset fs=Server.CreateObject("Scripting.FileSystemObject")set fo=fs.GetFolder("c:\")for each x in fo.files'Print the name of all files in the test folderResponse.write(x.Name & "<br />")nextset fo=nothingset fs=nothing%> Try this..<%dim fs,fo,xset fs=Server.CreateObject("Scripting.FileSystemObject")set fo=fs.GetFolder("c:\")for each x in fo.files'Print the name of all files in the test folderResponse.write(x.Name & "<br />")nextset fo=nothingset fs=nothing%>
  8. When I tried this code I did not have any problem getting values from the form, it seems to get and display the values I entered in the form, when all the info is correct..This is what i got with your code.Here's what you entered:Name: aEmail: a@yahoo.comAddress: aCity: aState: aaZip: 12345
  9. This is one of the popup code, how abt the other 2, i guess you said there are 3 popups....is this your complete code??
  10. Post your code, it'll be helpful...
  11. check out the link.. http://www.obout.com/t2/download.aspxIs this what you are looking for...
  12. Count the number of lines in a text filehttp://www.totallyphp.co.uk/code/count_the...a_text_file.htmcheck out the link.This is for a text file, but i guess will work for other files too..
  13. Hi, I dont think so this will work, when you write Value="java script:return variableName"then it will display the whole text "java script:return variableName" in the list.
  14. This javascript function will check if the email is in the correct format (validates email addr). I guess this is what you are looking for..function test(src) { var emailReg = "^[\\w-_\.]*[\\w-_\.]\@[\\w]\.+[\\w]+[\\w]$"; var regex = new RegExp(emailReg); return regex.test(src); }
  15. Hi joe, I think this is the problem, the variable in the asp.when i tried line this it seemed to work, i dont know how or why....document.write('<%call check("abc")%>')
  16. i am sorry, i made a big mistake.. i forgot to comment a part temp=varASPi am also getting the same error as yours....
  17. thats wierd, i am getting a 0, try print the value of temp, use below code, the temp must be "abc"<%sub check(temp)dim varASPvarASP="abc"response.write("temp = "+temp)temp=varASPResponse.Write(strcomp(temp,varASP))end sub%>
  18. try doing this, string compare, Response.Write(strcomp(temp,varASP))Returns:-1 (if string1 < string2) 0 (if string1 = string2) 1 (if string1 > string2) Null (if string1 or string2 is Null)
  19. Hashing is the best way to encrypt the password, as it cannot be reversed. Salt is nothing but to make the input for hashing a little different.Say if 2 ppl give the same password then it will generate the same hash value, this gives a chance for attack. but when you add "salt" to the password then the input for hashing will be different and so the hash o/p will be different even if the password may be same, but this process needs salt to be stored in the DB for future login verfication. MD5 and SHA1 are two of that hashing algorithms, abd SHA1 is considered a little more secure..I think hashing alone will do, but if you need higher security then use salt technique.HTH
  20. yeah i missed that part, saw it just now. isnt it just a comparision of doing the same job as the PHP code but using javascript. that wont be needed if you are using PHP alone.....
  21. I have never used this GUI, PGADMIN III. try it....http://www.pgadmin.org/
  22. Hi, Try this...sql statement:SELECT*FROM [Food] WHERE [itemName] LIKE '" & txtSearchItem & "'(that would be a single quotes on the outside and double quotes inside)
  23. I have not used XAMPP, but surely is like EasyPHP... give it a try.http://www.apachefriends.org/en/xampp.html
  24. Thats wierd, the article i provided seems to have the code in php.. how come i dont see any javascriptThis is the code in that article...<?php// ... do some form handling, like validation, filtering, etc$password = $_POST['password'];// Generate a random salt$salt = substr(md5(uniqid(rand(), true)), 0, 5);// Hash password$secure_password = md5($salt . md5($password));// Store password AND hash in database// ...?><?php// ... do some form handling, like validation, filtering, etc$username = $_POST['username'];$password = $_POST['password'];// Get user from database$user = getUser($username);// Compare passwordif ($user->password != md5($user->salt . md5($password))) { die ('Wrong username or password!');}// ... user entered correct password, do something?>
  25. Oh i didnt know that you are going to use client side scripting (javascript), then i guess its not gonna work, but anything you do on the client side can be viewed by the user, so its better you do it with PHP. there was a discussion in our forum abt ways to hide javascript code from the client, you may get a idea from it.
×
×
  • Create New...