Welcome Guest, Not a member yet? Register   Sign In
Anchor URL helper calls page not function
#1

[eluser]edziffel[/eluser]
I am trying to use the anchor url helper to call a function on the main controller.

Code:
class Drawback extends CI_Controller {
    
    
    function Drawback() {
        parent::__construct();
        $this->load->helper('url');
    }

Blah Blah (skipped functions that work fine)

Code:
function db_upload() {
        $data['title'] = "EZ Uploader";
        $data['heading'] = "Upload Source files here.";
        $data['directions'] = "Browse to Source file.  Browse to desired table";
                
        $this->load->view('db_upload_view', $data);
    
    }

on the index page have the following anchor set up which generates a proper link

Code:
<?php echo anchor('drawback/db_upload', 'Upload Source Files'); ?>

Problem is that instead of calling the db_upload function, it is looking for a page called db_upload and gives me the error:

The requested URL /localhost/drawback.com/index.php/drawback/db_upload was not found on this server.

which if that is what it is looking for is correct as it doesn't exist. Need to get it to call the function on the main controller instead. What am I doing wrong?

Thanks


Messages In This Thread
Anchor URL helper calls page not function - by El Forum - 07-21-2011, 12:18 PM
Anchor URL helper calls page not function - by El Forum - 07-21-2011, 01:22 PM
Anchor URL helper calls page not function - by El Forum - 07-21-2011, 01:57 PM
Anchor URL helper calls page not function - by El Forum - 07-21-2011, 02:12 PM
Anchor URL helper calls page not function - by El Forum - 07-23-2011, 10:03 AM
Anchor URL helper calls page not function - by El Forum - 07-23-2011, 10:07 AM
Anchor URL helper calls page not function - by El Forum - 07-23-2011, 12:02 PM
Anchor URL helper calls page not function - by El Forum - 07-23-2011, 12:13 PM
Anchor URL helper calls page not function - by El Forum - 07-23-2011, 02:32 PM
Anchor URL helper calls page not function - by El Forum - 07-23-2011, 03:14 PM
Anchor URL helper calls page not function - by El Forum - 07-23-2011, 03:54 PM
Anchor URL helper calls page not function - by El Forum - 07-23-2011, 04:45 PM



Theme © iAndrew 2016 - Forum software by © MyBB