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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:43:57+00:00 2026-05-31T22:43:57+00:00

I have a url which has some get variables in it like: domain.com/recover?email=my@email.com&token=abc123 inside

  • 0

I have a url which has some get variables in it like:

domain.com/recover?email=my@email.com&token=abc123

inside the recover controller i load a form with POST method

so when i submit the form i load again the recover controller but my GET variables disappear and return to

domain.com/recover

so how can i make sure the GET variables retain in the URL after submitting the form?

HTML:

<?php echo form_open('recover'); ?>
    <label for="password1" class="fl" style="width:160px;">Your new Password</label>
    <input type="text" value="" id="password1" name="password1" style="width:308px;margin-top:0;margin-left:10px;" />
    <label for="password2" class="fl" style="width:160px;">Retype your new Password</label>
    <input type="text" value="" id="password2" name="password2" style="width:308px;margin-top:0;margin-left:10px;" />
    <input type="submit" value="Recover password" class="button_ui" name="submit" />
<?php echo form_close(); ?>

Controller:

$data = array(
    'errors' => '',
    'show_password_form' => false
);
$get_email = $this->input->get("email") ? trim($this->input->get("email")) : "";
$get_token = $this->input->get("token") ? trim($this->input->get("token")) : "";
if ($get_email != "" && $get_token != ""){
    $this->load->model("recover_model");
    $data["show_password_form"] = true;
    //check new passwords and update
    $submit = $this->input->post("submit_change") ? trim($this->input->post("submit_change")) : "";
    if ($submit){
        $password1 = $this->input->post("password1") ? trim($this->input->post("password1")) : "";
        $password2 = $this->input->post("password2") ? trim($this->input->post("password2")) : "";
        //if password1 is valid
        if ($this->recover_model->valid_password($password1)){
            //if password2 is valid
            if ($this->recover_model->valid_password($password2)){
            //if both are equal
                if ($password1 == $password2){
                    //update password
                }else{
                    $data["errors"] = 'Your passwords do not match.';
                }
            }else{
            $data["errors"] = 'Your password must be at least 6 characters.';
            }
        }else{
            $data["errors"] = 'Your password must be at least 6 characters.';
        }
    }
}
$this->load->view("account/recover/recover", $data);
  • 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-31T22:43:58+00:00Added an answer on May 31, 2026 at 10:43 pm

    Change this line: <?php echo form_open("recover"); ?>

    To
    <?php echo form_open('recover', $_GET); ?>

    it will create all get values as hidden input. When you submit form, they will send with method that you defined for form.

    Or you can just write manually:

    <?php echo '<form method="post" accept-charset="utf-8" action="'.base_url().'recover?email='.$_GET['email].'&abc='.$_GET['token'].'" />'; ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a javascript file which has some code somewhat like this: var Slide
I have a javascript file which has a function calling a server (url) to
I have a URL which can be any of the following formats: http://example.com https://example.com
I have a url which could be www.website.com/order/?pg3=2 or www.website.com/orderstatus/?pg2= There could be several
I have a url which have a response in Json lon=-0.1275&pg=0 I parsed the
I have one webpage (lets call it A.html). A.html has some javascript which switches
I have a URL which has been converted into SEO friendly url using .htaccess.But
I have DropDownList, which has some options to choose from. Now after when user
I have an iPad UIWebView which has to display some rtfd.zip files. I try
I have a div with id, which has some other div's without id. Some

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.