Forum Moderators: coopster

Message Too Old, No Replies

Encrypting URL String

         

inveni0

2:16 am on Jan 21, 2006 (gmt 0)

10+ Year Member



I have a url string such as:

[mysite.com...]

The "3456789" is dynamic, of course, but I'd like to know how to encrypt it so that website users can not see it...how can I do this?

ajs83

7:25 am on Jan 21, 2006 (gmt 0)

10+ Year Member



You can use mod rewrite where it shows the page in directory form

http://www.mysite.com/showrecord/3456789/

or you can use the hidden form field and pass the information that way.

link from page

<input type="hidden" name="showrecord" value="$tag">

link to page

$showrecord = mysql_real_escape_string($_POST['showrecord']);

The execute the query by using the $showrecord variable.

inveni0

3:36 pm on Jan 21, 2006 (gmt 0)

10+ Year Member



I know I can use a form variable, but I don't know how to pass a form variable through basic <a href>'s

inveni0

5:17 am on Jan 22, 2006 (gmt 0)

10+ Year Member



Well, I decided to create another column in my table so that I now have two unique columns, one is the primary key. Now, when the insert record form is used, it md5's some of the personal information (name.email.weburl.etc) and stores it as a basic md5. Then, I md5 the basic so that I have two encrypted strings. I use the basic one to call up the users data to show to visitors, and the doubled one is used like a password and is never visible to visitors.

Seems to work fine.