Welcome Guest, Not a member yet? Register   Sign In
Sending a Code to an Email Address in CodeIgniter
#4

(This post was last modified: 04-21-2017, 11:49 PM by Wouter60.)

I can't see if $this->random_string() is a function inside your controller.
If it is, the next line of code doesn't make sense.
If it's not, you will get an error message on that line.

I think you should do this:
PHP Code:
$this->load->helper('string');
$code random_string('md5');   //random_string() is a helper function! 

To save the code into your database, the pass_word field must be a VARCHAR field that can hold 32 characters, because an md5 is always 32 characters long. If you want a shorter code, you can use one of the other options of the random_string() helper function.
http://www.codeigniter.com/userguide3/he...elper.html
Reply


Messages In This Thread
RE: Sending a Code to an Email Address in CodeIgniter - by Wouter60 - 04-21-2017, 11:48 PM



Theme © iAndrew 2016 - Forum software by © MyBB