Link to home
Start Free TrialLog in
Avatar of justmelat
justmelat

asked on

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

ASKER CERTIFIED SOLUTION
Avatar of Vel Eous
Vel Eous

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of justmelat
justmelat

ASKER

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')."')";
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.