After reading all the warnings against using simple things like ids in the url, is there a way to make a select statement do a MD5 sum on the value in its database and check it against a already md5 sum? If that was confusing, let me put it this way.

insted of url.php?id=1, use url.php?id=c4ca4238a0b923820dcc509a6f75849b which is just the md5 sum of 1. Now I would make it much more complicated then this example, I am just makeing it easy for sample reasons. Ok, onto the question now.

Can you make MySQL do something to this effect.

"SELECT * from databasename where id = \"$id\"" and use the MD5 sumed id? Cause if I left it this way, it would look and see does 1 = c4ca4238a0b923820dcc509a6f75849b. Well no. So can I do an MD5 sum on the variable stored in the database while comparing the values, that way it would see does c4ca4238a0b923820dcc509a6f75849b = c4ca4238a0b923820dcc509a6f75849b. Yes. See what I am saying?

    Write a Reply...