Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8164715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:22:42+00:00 2026-06-06T19:22:42+00:00

I tried to make admin panel and I am using sessions , but have

  • 0

I tried to make admin panel and I am using sessions , but have problem, session does not work,

index.php

$r=mysql_fetch_array($result);
$login=$r["login"];
session_register('login');
Header("Location: protected.php");

protected.php

<?php 
session_start();
if (!isset($_SESSION['login'])) { 
  echo "Not work";
}
else{
  echo "Work";
}
?>

I do not know what the problem is, because in index.php I register session, but in protected.php this session is not set.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T19:22:43+00:00Added an answer on June 6, 2026 at 7:22 pm

    Don’t use session_register(). It was removed in PHP 5.4.0.
    In index.php, add session_start(); to the top and replace your register call with $_SESSION['login'] = 'val';

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried to make a simple contact form via HTML and PHP but the
I tried to make an independent copy of an array but couldnt get one.
I tried to make a custom pushpin for the Bing Maps silverlight control, but
I tried to make an action fixture and it’s not working. (c# with Slim
I have a fairly complex relationship that I am trying to make work with
I have a problem. I built a script to make a request to an
I have a page that is part of a backend CRM admin panel. On
I am trying to have the pictures I upload in the Django admin panel
I have tried to make use of linked servers in SQL Server 2008 by
I'm using Zend-Framework 1.9.5 to make a web-application, But it's Url_Helper was quite tricky

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.