in reply to Re^9: cookie problem
in thread cookie problem
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^11: cookie problem
by bigup401 (Pilgrim) on Nov 13, 2014 at 13:12 UTC | |
here is full scrip with html source
| [reply] [d/l] |
by fishmonger (Chaplain) on Nov 13, 2014 at 16:28 UTC | |
You're being a little inconsistent in your code postings. For example is the cookie name 'id' or 'login'?
Why are you using fetchrow instead of fetchrow_array? The former is an old alias for the later and even was removed from the documentation. To learn of it, you need to search the module's source code or have old documentation. Why are you assigning $x but never use it? BTW, the author recommends against calling fetchrow (or fetchrow_array) in scalar context. You should call it in list context. And most importantly, why aren't you using the strict and warnings pragmas?
Here's an untested rewrite of your 2 scripts which should get you closer to your goal. Edit: oops - I made a couple updates to the posted script (i.e., I moved the db stuff to a sub) and poj spotted a goof on my part in the placement of $welcome and $login var assignments. Should be fixed now. home.pl
welcome.pl
| [reply] [d/l] [select] |
by bigup401 (Pilgrim) on Nov 13, 2014 at 18:28 UTC | |
| [reply] |
by fishmonger (Chaplain) on Nov 13, 2014 at 20:04 UTC | |
by fishmonger (Chaplain) on Nov 13, 2014 at 18:42 UTC | |