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

  • Home
  • SEARCH
  • 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 6547979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:53:44+00:00 2026-05-25T11:53:44+00:00

I’ve got a questionnaire with some fields checking (written on PHP + HTML). So

  • 0

I’ve got a questionnaire with some fields checking (written on PHP + HTML). So i send data over https.

It works like this

<form id="frm_order" method="post" action="https://site/service_for_businesses" autocomplete="off">
<input name="username" id="username" size="40" maxlength="500" type="text" value="">
<button name="Submit" id="Submit" value="Отправить" type="submit" onclick="return final_check();"></button>
</form>

After a user clicks Submit Button all the data is moved to $_SESSION[‘params’] and then is passed to HELPER class where this data is being checked. If everything is ok then a user is redirected to “SUCCESS PAGE” (this part works fine), but if there is any mistakes in USER’s data from the form fields then $_SESSION[..] is passed to VIEW-controller and the page is refreshed and warnings appear near form fields where there is a mistake.
The problem is that there is a strange behaviour like this:

1) i wrote some data, for example i wrote down a username “Mi%^XS”
2) pressed Submit
3) there is an error in checking data, cause users are not allowed to use special symbols so there is a redirect
4) i saw a page with my wrong username and a warning below
5) i did nothing but just pressed SUBMIT -> redirect
6) i got empty fields with no warnings
7) i pressed SUBMIT -> redirect
8) i got the same thing as in the step 4 -my username with warnings
etc

i cannot understand why.

My website is deployed to 2 web-servers (to avoid DdoS) with balancer.
It’s like there are 2 session with the same ID on both of the servers

  • 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-05-25T11:53:44+00:00Added an answer on May 25, 2026 at 11:53 am

    by default, php generates session ids and stores them in the directory defined by session.save_path in the php.ini

    Also, if you send to php a session cookie that does not exist, php will create the corresponding session.

    So, if you make a request on server 1 that creates a session, it will create a cookie for that session. If you then switch to server 2, it will recognize the session cookie, and if the session already exists, it will use it (your case obviously). In that case, you have the same session ID for 2 servers with distinct data on each.

    The solution to that problem is to store the sessions in a place that is common for the 2 servers (e.g a database). See : http://fr.php.net/manual/en/function.session-set-save-handler.php

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

Sidebar

Related Questions

i got an object with contents of html markup in it, for example: string
I've got a string that has curly quotes in it. I'd like to replace
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I have a JSP page retrieving data and when single or double quotes are
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string

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.