Welcome Guest, Not a member yet? Register   Sign In
add_clients
#1

views/clients.php

PHP Code:
<button type="button" class="add" href="<?php echo site_url('cpages/addclients'); ?>">ADD CLIENTS</button


controllers/cpages.php

PHP Code:
    public function addclients() { $this->load->view('addclients'); } 


config/routes.php

PHP Code:
/* routes addclients */

$route['cpages/addclients'] = 'cpages/addclients'


Hello,

Can anyone help me figure out why the button add client I am unable to move to another pages?

Thanks in advance.
" If I looks more intelligence please increase my reputation."
Reply
#2

Any error log or error message displayed on screen will help to resolve issue.

  Dodgy -Abhijeet
Reply
#3

To answer you exact question, it doesn't work because your code is wrong.
href is not a valid attribute of a button. use link tag <a href....> or change href for onclick="location.href='url';"

You don't need the route as your link is exactly the same as controller/method.
Reply
#4

just show complete controller and view ?
adn you make router it will not change anything if you write like that which is alias and manipulate same,
Reply




Theme © iAndrew 2016 - Forum software by © MyBB