how do i make a link?

General Chat, Comments
Post Reply
KaL
Posts: 344
Joined: Mon Jan 13, 2014 5:44 am

how do i make a link?

Post 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.
User avatar
a_bertrand
Posts: 1537
Joined: Mon Feb 25, 2013 1:46 pm

Re: how do i make a link?

Post by a_bertrand »

Most likely because the link doesn't contain the security token. How do you create the link?
Creator of Dot World Maker
Mad programmer and annoying composer
KaL
Posts: 344
Joined: Mon Jan 13, 2014 5:44 am

Re: how do i make a link?

Post by KaL »

nevermind, i figured how to get the token. thanks for the support Alain! :D
User avatar
cbsarge
Posts: 195
Joined: Mon Sep 14, 2015 3:20 pm

Re: how do i make a link?

Post by cbsarge »

I know this is an old post but, how DO you get the token?
User avatar
KyleMassacre
Posts: 573
Joined: Wed Nov 27, 2013 12:42 pm

Re: how do i make a link?

Post by KyleMassacre »

The token is automatic. Even if you just do an anchor and not the link button you will still get the token
User avatar
cbsarge
Posts: 195
Joined: Mon Sep 14, 2015 3:20 pm

Re: how do i make a link?

Post by cbsarge »

Thanks Kyle. I realized that after posting my question but, hadn't gotten back here yet to say "never mind" :)
User avatar
KyleMassacre
Posts: 573
Joined: Wed Nov 27, 2013 12:42 pm

Re: how do i make a link?

Post by KyleMassacre »

Haha all good in the hood
User avatar
a_bertrand
Posts: 1537
Joined: Mon Feb 25, 2013 1:46 pm

Re: how do i make a link?

Post by a_bertrand »

For tech details it's dealt by the "Security Token" module.
Creator of Dot World Maker
Mad programmer and annoying composer
User avatar
KyleMassacre
Posts: 573
Joined: Wed Nov 27, 2013 12:42 pm

Re: how do i make a link?

Post 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"));
Post Reply

Return to “General”