How do I encrypt my url from within my php/mysql application

i have a url like the attached.  After the php/mysql application is run, a confirmation page is shown and an email is sent to the client both have the url included.  I need to encrypt this url.  i don't know how to do this from within the application.  some have suggested setting a random number generator, attaching that to the ID number.  I think i just need to encrypt teh ID_NUMBER which is 202 in this case. How do i do that without disrupting the rest of the application? Where do I start?




http://rachel.total2solution.com/index.php?MODE=display&NEWPAGE=COMPLETEFORM&PAGE=COMPLETEFORM&ID_NUMBER=202

Open in new window

LVL 1
justmelatAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Vel EousResearch & Development ManagerCommented:
You could use base64 to encode/decode the ID_NUMBER variable:

http://uk2.php.net/base64_encode

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
justmelatAuthor Commented:
hope someone could guide me along in this:

I have added this to my code below, but when I look in my db I only see the letter S in the field that should hold the encrypted value: when i echo the variable - I have this: strong hold is : TGF0cmVsbGUgRnJlZW1hbg==
=========================================================
 $holdStrong = base64_encode("testID");
        echo "strong hold is : ".$holdStrong;

$sql  = "INSERT INTO REQ (R_NUMBER, R_STRONG, R_STATUS, R_OPTION, R_COMPANY_INITIALS, R_DATE_SUBMITTED) VALUES ('";
               $sql .=  $this->reqNum . "','$status', '$holdStrong','$option','$theCompany','".date('Y-m-d')."')";
Vel EousResearch & Development ManagerCommented:
In your SQL statement above, the strong and status field value pairs appear to be mixed.

Your fields are STRONG, STATUS however your values are $status, $holdStrong.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.