GithubHelp home page GithubHelp logo

keep the session when redirect about huge HOT 5 CLOSED

berhin avatar berhin commented on July 20, 2024
keep the session when redirect

from huge.

Comments (5)

panique avatar panique commented on July 20, 2024

Hey,

thanks a lot! But i need to see more code to help you..
can you send me your index.php ?

cu

Am 13.05.2013 21:53, schrieb berhin:

Hi Panique!

first thing first, great script buddy! Appreciate you sharing it!

Now I got this issue which is driving me insane. I basically
structured my site by using includes in my index page. When user click
on the menu say "Home", a variable "page" will be set to "Home" in URL
Basically:

if ($page == "home")

include("includes/home.php");

elseif ($page == "magazine")
include("includes/magazine.php");

etc..

Now I want to show a menu for logged in users only. So once a user is
logged in, he/she will be able to see another menu besides the regular
one. Like this:

isUserLoggedIn() == true) { ?>
  • A
  • B
  • C
  • D
  • E

So all this works just perfect only on that first page where user get
logged in to. So if credentials are ok and he/she log in to home, the
new menu shows up, good!

but if redirect to another page from there, like "Magazine"..the new
menu disappears??

It should remain, since it is in the index page..seems as the session
is gone?

Help me out will ya?

Thanks
/B


Reply to this email directly or view it on GitHub
#45.

from huge.

panique avatar panique commented on July 20, 2024

there's a lot missing here: isUserLoggedIn() == true) { ?>

can you send the code by mail ? [email protected]
I think what you posted here was destroyed a little bit by github

from huge.

berhin avatar berhin commented on July 20, 2024

just sent the code to ur mail,

thanks alot!!

from huge.

panique avatar panique commented on July 20, 2024

he,

sorry but your code is really weird, i cannot follow exactly.
i can only say that you should order that code and handle things with
includes.
and then, debug, line by line. you can always have a look on your
$_SESSION variable via var_dump($_SESSION);
maybe this helps you

ciao

Am 13.05.2013 23:40, schrieb berhin:

just sent the code to ur mail,

thanks alot!!


Reply to this email directly or view it on GitHub
#45 (comment).

from huge.

panique avatar panique commented on July 20, 2024

closed, as this is not a real issue.

from huge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.