EllisLab text mark
Advanced Search
     
my Controller is not working
Posted: 08 October 2012 03:11 AM   [ Ignore ]
Joined: 2012-09-22
10 posts

i have some controller like this

<td colspan="8"><?php
                
echo form_open('c_kategorimaterial/addkategorimaterial');
                echo 
form_submit('tambah','tambah');                
                echo 
form_close();
                
?></td

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

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

why does the second controller is not working ?

edit : it works when i use

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

why does the button is not working ?

 

 
Posted: 19 October 2012 03:32 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2011-01-21
42 posts

i’m not sure .. but is it typo ?
C_material should be c_material

 
Posted: 19 October 2012 06:10 AM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Joined: 2012-08-12
80 posts

you post the whole code your first and second controller

 
Posted: 19 October 2012 07:21 AM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2011-10-12
103 posts

What you pasted is not a controller but its a view.

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

<a href='<?php echo site_url("c_material/addmaterial"); ?>'>Tambah</a
 Signature 

SMC - full CRUD Model for CodeIgniter:
forum: http://codeigniter.com/forums/viewthread/223845/