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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T01:22:31+00:00 2026-06-01T01:22:31+00:00

In the settings.php i have some input for the realname,hobby,city and select tag for

  • 0

In the settings.php i have some input for the realname,hobby,city and select tag for the languages

The html form is easy and i’m not going to copy it 🙂

This is the php code for the form

<?php
if(isset($_POST['submit'])){


  if($this->edit->process()){
    $s = 1; 
  }

}

if($s){echo '<p id="success">Success</p>';}

?>

This is in the view file and when the form is submit the $this->edit = the model for the updating the user data.

Everything work really good but in head.php there is this code

<?php $lang = $this->lange('global',$this->getUser->language($_SESSION['userID']));?>

With him this get the user current language and after that load the file with lange()

So if the submit is like this,the inputs and select tag are changing with what the user have choicen but the to see the new language they have to refresh the page. This is not good,because the user may be confuced that they did something wrong.

But if the form with method=”POST” the page is refreshing and still with the old language

  • 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-01T01:22:32+00:00Added an answer on June 1, 2026 at 1:22 am
    1. It is going to be quite hard to change all the texts in the DOM model to make the language change without redirect. I doubt it’s really your desire.
    2. You ought to make a GET method redirect after processing any POST form. So, instead of printing whatever “success” messages you have to reload the page.
    3. Using session to store the language is not good method, the language have to be set by means of the page address – a subdomain (preferable) or a virtual directory.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a settings.php file with parametric variables and a functions.php with well, some
I have a large PHP application. After I changed some settings I get a
I have added some javascript in html page for input validation.same page is working
I have settings.php file that I want to keep some constants in, like my
I have a php script that handles a form input. For design reasons both
I am writing a PHP application that will have the ability to edit settings
I am trying to read some settings from php.ini using zend. The API that
I have a form, and I have some jquery code to override the submit
I have a small form for setting event reminders. Couple check boxes and some
I have some code that works and changes the style sheet using a form.

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.