EGP
EGP

Reputation: 397

CodeIgniter: How to remove message from URL?

i have a message that is passed on to the user on the page (say if they write in a wrong email address or password) but it's also shown in the url.

http://domain/login?message=You%20have%20been%20logged%20out%20of%20site.

this is an example. shows the user has logged out. another ?message could be "you have typed a wrong password" (with %20 for spaces of course)

how do i get rid of that? and just either have them re-direct to /login or something like /login/leave or login/wrong-info

Upvotes: 2

Views: 443

Answers (3)

Herr
Herr

Reputation: 2735

You should also note that CodeIgniter does not support the GET array by default.

Upvotes: 0

Cancerman
Cancerman

Reputation: 1

Yep, flashdata should be the way to go there...

http://codeigniter.com/user_guide/libraries/sessions.html

Upvotes: 0

afarazit
afarazit

Reputation: 4984

It seems you're passing the message with $_GET. You better use the sessions flashdata() function that comes with CI. Here's the link. Search for Flashdata.

Upvotes: 7

Related Questions