Hi!
I'm using special characters in my page so to avoid convertion issues, I save the data to MySQL using base64_encode() and to display it back, I use base64_decode. Everything works perfect.
The problem is that I need to search that data. For example, if I have something saved like "The typical Hello World", encrypted looks like VGhlIHR5cGljYWwgSGVsbG8gV29ybGQ=.
1.- I can't search ... WHERE field LIKE '%Hello%'... because it won't find anything.
2.- I can't search:
Because "Hello" ecrypted is "SGVsbG8=" and won't match either.PHP Code:$search_srt = base64_encode($_POST['search']);
... 'WHERE field LIKE '% " . $search_str . "%'" ...
Any ideas?




Reply With Quote