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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:58:11+00:00 2026-06-17T16:58:11+00:00

I have learned so much from stackoverflow. I have run into a problem that

  • 0

I have learned so much from stackoverflow. I have run into a problem that is strange,
Here it goes.

I have coding that checks if a session has started and if not, I start the session. No problem there

Here is my code

If (session-id = "")
{Session_start();
/* setting session ids */
}

I have an include file that submits a form to the same script (script above)

But when returning to the page via post method, the session gets started again, as if the session stopped.

Edit

If (session_id == “”)

The mistake there was a typo.

The problem I originally had was that upon first initialization, I had set session arrays

/* If statement */
$_Session['test'] = ['1','2','3','4','5'];
/* end of if statement */

When user submits data to the same script, the session array will be null, giving an error. The way I solved it was to put session_start on the top of the script and no longer on the if statement. That seemed to solve the problem, thanks for all your input.

  • 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-17T16:58:11+00:00Added an answer on June 17, 2026 at 4:58 pm

    You need to start the session at the top of every page, just to keep the session. That will not clear the running session, so you can just remove the condition for it to start.

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

Sidebar

Related Questions

I have learned so much from http://www.summerofnhibernate.com/ nhibernate screen casts that i wonder why
I have learned from various tutorial that If a client can reasonably be expected
I don't have much experience doing unit testing. From what I learned, code should
Recently I have been looking into Cassandra from our new project's perspective and learned
Edit: I've learned much since the posting of this question, and so I have
I have 4 years experience on DotNet, not much. I now learned developing for
I have learned from the sencha doc how to create a simple MVC application,
I have learned that Windows uses UTF-16LE on x86/x64 systems. What about Linux? Which
Very new to AJAX, but have learned a bit from online tutorials. If I
From my other question i learned that asp.net kills my threads because 'it feels

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.