Welcome Guest, Not a member yet? Register   Sign In
Registration form comfirmation email
#1

[eluser]selman555[/eluser]
Hi!

I'm in a bit of trouble, I think some of you know the tutorial on youtube from alboyd for making a registration form using codeigniter.

I have a couple of functions (writing users to a database and making sure that the usernames are unique. These functions all work perfectly, but Al showed us how to call a function through url...
He suggested making a function name register_comfirmation and calling that through the url http://localhost/codeigniter/ecards/user...firmation/.$activation_code.

Here's an example of my code:
Code:
echo '<b>Bedankt dat je gekozen hebt voor Magic E-Cards.</b><br /><br />Klik op deze link om je activatie af te ronden<br />'.'<a href="http://localhost/CodeIgniter/E-Cards/user/registerConfirm/'.$activatieCode.'">Bevestig deze link</a><br />Indien u zich niet ingeschreven heeft, kan u deze gewoon negeren.';
What it says is just: thanks for registering, click "this link" to comfirm registration.
I've tried using anchor() too, but that gives me the same dead-end.
In the same class, I made a function like this:
Code:
function registerConfirm() {
  $activCode = $this->url->segment(3);
  if ($activCode == '') {
   echo '<b>Error:</b><br /><br />';
   echo 'Uw activatiecode werd niet gevonden in de link die werd verstuurd.<br />';
   echo 'Controleer of u de juiste link heeft doorgestuurd.<br /><br />';
   echo 'Onze excuses voor dit ongemak!';
   exit();
  }
  $geactiveerd = $this->User_model->confirmRegistration($activCode);
  if ($geactiveerd) {
   echo '<b>Gefeliciteerd</b><br /><br />';
   echo 'U account werd succesvol geactiveerd.<br />';
  } else {
   echo '<b>Helaas!</b><br /><br />';
   echo 'Uw activatiecode werdt niet aanvaard.<br />';
   echo 'De code werd niet gevonden in de database.';
  }
}

This always brings me to a page that says "object not found, blablabla".

Does someone have a clue what I'm doing wrong?




Theme © iAndrew 2016 - Forum software by © MyBB