Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP Session Behaviour
    primarykey
    data
    text
    <p>I've got a questionnaire with some fields checking (written on PHP + HTML). So i send data over https.</p> <p>It works like this</p> <pre><code>&lt;form id="frm_order" method="post" action="https://site/service_for_businesses" autocomplete="off"&gt; &lt;input name="username" id="username" size="40" maxlength="500" type="text" value=""&gt; &lt;button name="Submit" id="Submit" value="Отправить" type="submit" onclick="return final_check();"&gt;&lt;/button&gt; &lt;/form&gt; </code></pre> <p>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:</p> <p>1) i wrote some data, for example i wrote down a username "Mi%^XS"<br> 2) pressed Submit<br> 3) there is an error in checking data, cause users are not allowed to use special symbols so there is a redirect<br> 4) i saw a page with my wrong username and a warning below<br> 5) i did nothing but just pressed SUBMIT -> redirect<br> 6) i got empty fields with no warnings<br> 7) i pressed SUBMIT -> redirect<br> 8) i got the same thing as in the step 4 -my username with warnings<br> etc</p> <p>i cannot understand why.</p> <p>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 </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload