Problem of passing slash to controller |
[eluser]bhakti.thakkar[/eluser]
Hi all, I have a user input form in which the data can contain characters like for e.g ORG/TC/1011/003447. Now what happens is in this case the insert fails as the data gets split for every slash as a separate parameters passed to the controller, while this is not the case. How can i deal such cases?? Thanks n advance
[eluser]LuckyFella73[/eluser]
Try using urlencode: http://php.net/manual/en/function.urlencode.php Before saving into DB you can urldecode the values.
[eluser]bhakti.thakkar[/eluser]
thanks for your response. I will look into the urlencode. Also can i try replacing the / with some other character by javascript. then pass the value to the controller and then again string replace that other character back with / and save the value to DB?? As my real issue is passing the values of textbox that has '/' in it. I think ultimately the urlencode and ulrdecode will do the same
[eluser]LuckyFella73[/eluser]
I think I missunderstood your problem a little bit. It's not clear to me how your process looks like exactly. Can you provide the controller code related to your problem? The process of handling form data and/or repopulating seems unusual to me |
Welcome Guest, Not a member yet? Register Sign In |