PHP How to implement user login after the user ID for all navigation bar jump page

Source: Internet
Author: User

The problem is probably this: when user a landing, will first jump to the first page,

Home page parameters are like this, but what if you want to connect to other sections in the navigation bar? How to just pass it once to meet all the jumps

Reply content:

The problem is probably this: when user a landing, will first jump to the first page,

Home page parameters are like this, but what if you want to connect to other sections in the navigation bar? How to just pass it once to meet all the jumps

Not very clear requirements, for the moment, to understand how the parameters in different links and pages directly passed.

Method

  1. In the PHP output when the parameters are written in the navigation bar links.
  2. There is a session or cookie that is read when the module in the navigation bar is used.
  3. Add parameters to the specified link dynamically by JS mode

Suggestions

  1. It is important to maintain a good URL structure if I prefer to query the user's required parameters in the backend via the session.
  2. Do not misuse cookies, the project is big, the first to see these messy key, the head will be very big.
  3. The final suggestion, if the user relationship is strong, put the session, and vice versa through the code encapsulation to query.

In the session, and then read it on the front.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.