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 9118081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:03:27+00:00 2026-06-17T05:03:27+00:00

I fell like this is a pretty simple fix, but i have tried so

  • 0

I fell like this is a pretty simple fix, but i have tried so many different ways of doing this and have spent sooo many hours on google. basically a user logs in and my script makes sure that they are in my database. that works great, then i start my seesion.

session_start();
$_SESSION['log']=$username;
header("location:lindex.php");

On my next page, lindex.php, i call the session into order and try to set an if statement based on whether that value in $_SESSION['log'] is “support” or not, however it seems that no matter what the value in my session call is, it always performs the if statment i have tried basing it on string length, strstr, strpos, ==”support. nothing is working. any ideas? here is lindex.php:

session_start();
if(empty($_SESSION['log'])){
echo "You must log in";
exit();}

if(strstr($_SESSION['log'], 'support'))
{
header("location:../sindex.php");
}

on a side note. if session is empty, it does exit script.

  • 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-17T05:03:28+00:00Added an answer on June 17, 2026 at 5:03 am
    if(strstr($_SESSION['log'], 'support'))
    

    should be:

    if($_SESSION['log'] == 'support'))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm pretty sure I should be able to use arrayInd() to do this, but
I've been doing some upgrades to a friends website. But now it looks like
I'm trying to make something that looks like this, but I don't know how
I have used facebook open graph tags for facebook like but they are not
I have a Javascript hash table, like so: var things = [ ]; things[hello]
I have a question about sorting. int[][] array = {{4,2},{1,7},{4,5},{1,2},{1,1},{4,1}}; After sorting this array,
I have been reading up on Dependency Injection frameworks. I really fell in love
I would like to have these urls as categories on my page: http://example.com/en/articles //for
I have a form with different options provided by radio buttons. I also have
Okay, so this will probably be closed or whatever, I don't care. I have

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.