Welcome Guest, Not a member yet? Register   Sign In
my Controller is not working
#1

[eluser]nencor[/eluser]
i have some controller like this
Code:
<td colspan="8">&lt;?php
                echo form_open('c_kategorimaterial/addkategorimaterial');
                echo form_submit('tambah','tambah');                
                echo form_close();
                ?&gt;</td>

then i copy paste them, then change into similiar controller that open different form

Code:
<td colspan="7">&lt;?php
                echo form_open('C_material/addmaterial');
                echo form_submit('tambah','tambah');
                echo form_close();
                ?&gt;</td>

why does the second controller is not working ?

edit : it works when i use

Code:
<td colspan="7">
                    <a href='&lt;?php echo base_url(); ?&gt;index.php/c_material/addmaterial'>Tambah</a>
                </td>

why does the button is not working ?

#2

[eluser]kreamik[/eluser]
i'm not sure .. but is it typo ?
C_material should be c_material
#3

[eluser]Beginers[/eluser]
you post the whole code your first and second controller
#4

[eluser]alexwenzel[/eluser]
What you pasted is not a controller but its a view.

Tip: generate your urls this way to be more flexible and save:

Code:
<a href='&lt;?php echo site_url("c_material/addmaterial"); ?&gt;'>Tambah</a>




Theme © iAndrew 2016 - Forum software by © MyBB