• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Passing string in url with space

#1
HI , sorry for english , i must send 3 value from get , the first is a url , to have a work value i encode whit :

Code:
<a href="<?=base_url()?>index.php/ranking/match/<?=base64_encode($v->anchor) ?>/<?= $v->team_home  ?>/<?= $v->team_away ?>" class="btnbtn-success">MATCH</a>

In my controller i do a query with the two team but if the team's name have space inside i have error .

I try to encode team to but i have the equal simbol ( = ) at the end and i have  "the uri you submitted has disallowed characters in " error.

How can i solve it ?
Reply

#2
SEE:

CodeIgniter User's Guide - url_title
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#3
(12-23-2018, 10:42 AM)InsiteFX Wrote: SEE:

CodeIgniter User's Guide - url_title


But to decode how can i do ?
Reply

#4
Use rawurlencode to encode the string and rawurldecode to decode it on the other side.
http://php.net/manual/en/function.rawurlencode.php
http://php.net/manual/en/function.urldecode.php
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.