[eluser]mabright[/eluser]
I am working on an internal message system for my application and I have a compose message view that is at mysite.com/messages/compose.
On this form I have the post action as <?php echo current_url().'/send'; ?>.
I expect this to call my the compose method in my controller with a parameter of 'send' and that I can process the send logic accordingly.
The form submit (which is using a standard form button) just re-submits my compose page with /send in the URL instead of returning my test message that I put in place to see if the parameter is being passed.
Controller code below:
Code:
public function compose($action = '')
{
if($action == 'send')
{
$msg_data['test_msg'] = 'This is a test';
}
$msg_data = array('inbox_count' => $this->inbox_count,
'sent_count' => $this->sent_count,
'trash_count' => $this->trash_count);
$data['column_main'] = $this->load->view('member/message_compose_view', $msg_data, TRUE);
$this->_display('',$data);
}
Am I doing this the correct way?