in reply to Re^12: cookie problem
in thread cookie problem

thanks it worked now bt i had to remove some some codes u wrote i removed sub sub get_uid {return $id; } i remove my $id = get_uid($username, $password); thanks for the idea, wow anyway am feeling good by using fetchrow instead of using fetchrow_array i know its nolonger supported bt in other way there is were it helps me

Replies are listed 'Best First'.
Re^14: cookie problem
by fishmonger (Chaplain) on Nov 13, 2014 at 20:04 UTC

    Don't be surprised if your scripts stop working when the undocumented fetchrow() alias gets removed.

Re^14: cookie problem
by fishmonger (Chaplain) on Nov 13, 2014 at 18:42 UTC

    I just tested it on my system and it works correctly. If it's failing to work correctly for you, then my best guess is that the sql statement isn't returning the id. Try running that same query in the mysql cli (or phpmyadmin if you prefer) to verify that it returns what you expect.

    Your choice to switch to using the server side sessions is good, but when you feel less frustrated, you should retry the cookie route just to learn how it should be done.