URL misconfigured in WAMP |
Hi guys !
I'm having a problem for the past several days. I tried all possibilities and check the foruns but haven't found any kind of solution. I'm trying to create a basic form to add stuff to a DB table, but I can't get the link of the button on the form to work. No matter what kind of link I try to put in the "form_open", it doesn't lead to the page I want. The link, somehow, adds up to itself and won't lead into the correct page. Some exemples of what I tried below with its results: echo form_open(base_url().'insertadmin/onadd'); http://localhost/ws_admin_portal/index.p...dmin/onadd echo form_open(site_url('insertadmin/onadd')); http://localhost/ws_admin_portal/index.p...dmin/onadd echo form_open(current_url('/onadd')); http://localhost/ws_admin_portal/index.p...nsertadmin echo form_open('onadd'); http://localhost/ws_admin_portal/index.p....php/onadd The result I was expecting was: http://localhost/ws_admin_portal/index.php/db/onadd Please, help me ! =[ [ ]'s
Set your $config['base_url'] properly.
It has to have the 'http://' or 'https://' prefix.
Also in the future the correct way of using base_url() is like this.
PHP Code: base_url('insertadmin/onadd'); And you can also pass it an array(). What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
I know you can use both I am just stating how the user guide states it.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |