Welcome Guest, Not a member yet? Register   Sign In
Yet another validation question
#8

[eluser]yello[/eluser]
The controller that sends the email and the controller that outputs the profile view are diffrent... is that a problem?

Profile Controller:
Code:
function profile()
    {
        $this->load->helper('form');
        $this->load->library('validation');
        
        $country_uri = $this->uri->segment(2);
        $state_uri = $this->uri->segment(3);
        $city_uri = $this->uri->segment(4);
        $username_uri = $this->uri->segment(5);
        $valid = $this->queries->is_valid_username($country_uri, $state_uri, $city_uri, $username_uri);

        if ($valid !== false)
        {
            $data['installer'] = $valid;
            $this->load->view('profile/profile', $data);
        }
    }

Email controller
Code:
function send()
    {
        $this->load->library('validation');
        $this->load->helper('url');
        
        $rules['name']    = "required";
        $rules['email']        = "required";
        
        $this->validation->set_rules($rules);
        if ($this->validation->run() == FALSE)
        {
            redirect('browse/united-states/bitch-state/biiiiitch/misstest'); //Relative to your domain
        }
        else
        {
            echo("success");
        }
    }


Messages In This Thread
Yet another validation question - by El Forum - 10-20-2007, 10:55 PM
Yet another validation question - by El Forum - 10-20-2007, 11:32 PM
Yet another validation question - by El Forum - 10-21-2007, 01:26 AM
Yet another validation question - by El Forum - 10-21-2007, 09:10 AM
Yet another validation question - by El Forum - 10-21-2007, 09:13 AM
Yet another validation question - by El Forum - 10-21-2007, 09:16 AM
Yet another validation question - by El Forum - 10-21-2007, 09:22 AM
Yet another validation question - by El Forum - 10-21-2007, 09:26 AM
Yet another validation question - by El Forum - 10-21-2007, 09:30 AM
Yet another validation question - by El Forum - 10-21-2007, 09:34 AM
Yet another validation question - by El Forum - 10-21-2007, 09:42 AM
Yet another validation question - by El Forum - 10-21-2007, 11:15 AM
Yet another validation question - by El Forum - 10-21-2007, 12:35 PM



Theme © iAndrew 2016 - Forum software by © MyBB