/    Sign up×
Community /Pin to ProfileBookmark

HELP! Newbie can’t get cookies to work!

I am *not* a programmer of any kind. What I *can* do is read through a script and make changes to modify for my purposes. I’m using a script that I found on [url]http://www.javascript-page.com[/url] that allows for unsecure login via javascript. I have the script working EXACTLY as I’d like it to, except it only protects that page.

I think what I need to do is have the script write the cookie just before it redirects the user with the line: “location = goodURL”. I’ve tried several different ways, but none seem to write a cookie. Also, what do I put on each protected page so that if the cookie exists, the user sees that page but if not, they are redirected to the login page?

Any help would be appreciated. Again, I’m a newbie and may need a little extra explanation, so go s….l….o….w….. THANKS!

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @backslashtech spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...