Welcome Guest, Not a member yet? Register   Sign In
how to pass empty variable into url?


i've create a class with index function like this

class Myclass extends Controller
function Myclass()

function index($var1="",$var2="",$var3="",$var4="")
  .... bla bla bla

this URL is working the way i wanted:

but with this url, i can't get var4 value

why is that happen? any solution?

sorry for my poor english Smile

You can't pass empty values in the URL, the repeated /// are stripped.

If the position of the variable is not relevant, you can simply use http://blabla.com/codeigniter/myclass/index/content4.
If it is relevant, use http://blabla.com/codeigniter/myclass/in...4/content4, then use $this->uri->uri_to_assoc() to fetch them.

woaah replied so fast..thanks.

ok got it..
the position is relevant, i will try: $this->uri->uri_to_assoc()

Theme © iAndrew 2016 - Forum software by © MyBB