Are you a regular stikked user? Signup so you can keep track of your pastes!
  1.         function register()
  2.         {
  3.  
  4.                 $this->form_validation->set_rules('user','Username','required');
  5.                 $this->form_validation->set_rules('pass','Password','required');
  6.                 $this->form_validation->set_rules('pass2','Password Confirmation','required|matches[pass]');
  7.                 $this->form_validation->set_rules('email','Email','required|valid_email');
  8.                 $this->form_validation->set_rules('paypal','Paypal Address','required|valid_email');
  9.                
  10.                 if( !$this->form_validation->run() )
  11.                 {
  12.                         $this->basetemplate->set("title","Register");
  13.                         $this->basetemplate->set("domain",$this->config->item("base_url"));
  14.                         $this->basetemplate->load(array(
  15.                                 'users/register',
  16.                         ));
  17.                 }
  18.                 else
  19.                 {
  20.                         $data = array(
  21.                                 'username' => $this->input->post("user"),
  22.                                 'userpass' => md5( $this->input->post("pass") ),
  23.                                 'useremail' => $this->input->post("email"),
  24.                                 'userpaypal' => $this->input->post("paypal"),
  25.                         );
  26.                         $this->db->insert("users", $data);
  27.                         redirect("/users/login");
  28.                 }
  29.                
  30.         }

Reply to "Untitled"

Here you can reply to the paste above

Create a snipurl

Make Private

Feeling clever? Set some advanced options.