Page 1 of 1

how do i make a link?

Posted: Sat Aug 29, 2015 6:34 am
by KaL
this is what i have:

Code: Select all

http://localhost/nwe2/index.php?p=crime

problem:

i want to click on this link to go to crime module but i keep on logging out.

Re: how do i make a link?

Posted: Sun Aug 30, 2015 11:54 am
by a_bertrand
Most likely because the link doesn't contain the security token. How do you create the link?

Re: how do i make a link?

Posted: Mon Aug 31, 2015 2:46 am
by KaL
nevermind, i figured how to get the token. thanks for the support Alain! :D

Re: how do i make a link?

Posted: Tue Oct 13, 2015 7:59 pm
by cbsarge
I know this is an old post but, how DO you get the token?

Re: how do i make a link?

Posted: Tue Oct 13, 2015 11:03 pm
by KyleMassacre
The token is automatic. Even if you just do an anchor and not the link button you will still get the token

Re: how do i make a link?

Posted: Tue Oct 13, 2015 11:20 pm
by cbsarge
Thanks Kyle. I realized that after posting my question but, hadn't gotten back here yet to say "never mind" :)

Re: how do i make a link?

Posted: Tue Oct 13, 2015 11:21 pm
by KyleMassacre
Haha all good in the hood

Re: how do i make a link?

Posted: Wed Oct 14, 2015 7:30 am
by a_bertrand
For tech details it's dealt by the "Security Token" module.

Re: how do i make a link?

Posted: Wed Oct 14, 2015 1:34 pm
by KyleMassacre
a_bertrand wrote:For tech details it's dealt by the "Security Token" module.
<explosion>Mind Blown</explosion> hey berty long time no see.

But yes ^ what he said and done through the Secure function if I recall. While we are on this subject it's good practice that when you do a header() redirect wrap the location in the Secure() function:

Code: Select all

header("Location: ".Secure("index.php?p=some_where"));