How do i carry user id from one page to another?

By storing information about the user id or user session as a cookie in the end-user's web browser.

Keep in mind, if you just want to simply store user id as a cookie without messing with PHP sessions, encrypt it so that it can't just be changed to a different id by the end-user.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.