You probably could have skipped most of the HTML in that post. I makes it hard to wade through. Also, if you read through your post carefully, you'll notice that you didn't actually ask a question, so it's tough to know how to help you. Even when you mention that one of your admin functions, you don't mention which one. However, I did notice a couple of things:
sub add_user{ my $cookie = "cookie('loggedIn')"; # <-- What? if ($cookie eq "true"){
I don't think you want "cookie('loggedIn')" in quotes. The other thing I noticed (and this will throw a malformed header error:
sub login_html { my $cookie = "cookie('loggedIn')"; print<<EndOfHTML; <HTML> <HEAD>
You forgot to print the header and you again are again failing to call the cookie() function.
Also, since you're apparently using CGI.pm, you may as well use its header() function:
sub login_html { my $cookie = cookie('loggedIn'); print header(), <<EndOfHTML; <HTML> ...
Cheers,
Ovid
New address of my CGI Course.
In reply to Re: Trouble with cookies
by Ovid
in thread Trouble with cookies
by titanic_fanataic
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |