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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:10:28+00:00 2026-06-17T20:10:28+00:00

I am trying to implement an email verification after registering an account. So after

  • 0

I am trying to implement an email verification after registering an account. So after registering an account, an email will be sent to the user email to verify. the email was sent using the email class of codeigniter.

The code for sending the email is as below

$config['wordwrap'] = TRUE;
$this->email->initialize($config);
$this->email->from('admin@mathplication.com', 'admin');
$this->email->to($user_email); 

$this->email->subject('Registration verification for mathplication');
$this->email->message('
        Thanks for signing up!
            Your account has been created, you can login with the following credentials 
            after you have activated your account by pressing the url below.
            Please click this link to activate your account:
<a href='.base_url('verify').'?email='.$user_email.'&rand='.$user_rand.'>Click Here</a>'); 

$this->email->send();

and in the routes.php in the config folder

$route['verify']    = "login_register/view_verify

in which view_verify is the function in my login_register controller

inside this view_verify I will check the two parameters I passed which are the email and the random string generated.

function view_verify($email,$rand)
{
    //$email = $this->input->get('email');
    //$rand = $this->input->get('rand');
    $this->load->database();
    $this->load->model('login_model');
    $result= $this->login_model->email_verification($email,$rand);
    if($result==TRUE)
    {
        $this->load->view('pages/verify');
    }
}

I will get a 404 page not found error. Not sure if my routing with the variables is the problem here or not or is there another way of passing parameters through url to the controller. Thanks in advance for the help.

  • 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-17T20:10:29+00:00Added an answer on June 17, 2026 at 8:10 pm

    If you are going to be using query strings in the url, you will need to enable that in the config. Possible there might also be issues with permitted_uri_chars because of the email address.

    You could generate the url with the user id and nonce like:

    <a href='.base_url('verify').$user_id.'/'.$user_rand.'>Click Here</a>'); 
    

    Which should produce something like

    http://www.example.com/verify/1234/23q23rq2rq24rq34rq34rq34r
    

    Then in routes:

    $route['verify/(:any)']    = "login_register/view_verify/$1";
    

    At this point the function view_verify should work correctly exactly as it is now except you will need to adjust your model to do the lookup via user id instead of by email.

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

Sidebar

Related Questions

I'm trying to implement email confirmation using Pyramid framework. Here's the code that confirms
I am trying to implement form validation using cakephp models. Here are my code
I've been trying to follow this instructions to implement email templating using NVelocity but
I am trying to implement cross domain authentication using HTML5. The domain 2 will
I'm trying to implement user registration using yii ActiveRecord. the problem is that every
I'm trying to implement a login feature in my Android app using Lukencode 's
I am trying to implement an authorization feature using the Facebook JavaScript SDK. When
I am trying to implement a Codeigniter based app on Android via phonegap, all
I'm trying to implement a mail parsing feature on a Codeigniter site. This is
I'm trying to implement in-app email for my application and I'm coming across a

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.