Hebrew on URL? |
[eluser]LiorBroshi[/eluser]
Hola! I am building a search function -> mysite.com/search/STRING_TO_SEARCH and i've encountered two problems: 1. How can i create a form that the user enters string to search and it displays it in the URL? CI won't allow GET forms (because it creates questions marks...). i thought about JS form that just redirects to mysite.com/search/STRING_THAT_USER_TYPED_IN_TEXTBOX 2. How can I allow Hebrew chars on the URL? i dont know regexp stuff... Lior
[eluser]demogar[/eluser]
You could take a look at base64_encode and base64_decode Do something like: Code: // Controller: The code is for you to take an idea about the code. You can use the base64_encode/decode in different ways. You could also make the form post to /do_search/ in do_search function encode the URL and then redirect to /search/ where you decode the URL and search the results and show them. Cheers Edit: If you will use this method I think you have to add some things to the URL permitted chars ( = ? for example). This is at your config.cfg file. Regards
[eluser]Shay Falador[/eluser]
Hey there, I am from Israel too About your first question, you should probably do one of the following: a. Use javascript. b. Receive by post and redirect (as demogar suggested). About your second question, simply open APP-FOLDER/config/config.php, find: $config['permitted_uri_chars']. Add א-ת (the line should like this: $config['permitted_uri_chars'] = 'א-תa-z 0-9~%.:_-'. If you need any help feel free to contact me via msn or email <[email protected]>. Good luck! |
Welcome Guest, Not a member yet? Register Sign In |