Form submit |
[eluser]Unknown[/eluser]
Hi guys... I am new in codeigniter, I build a form with a text field, a textarea and a submit button. When I submit the form the the current url is added with the form action url. Explaining... current url is : http://localhost/localprojects/codeignit...ews/create and after submitting the form the url becomes http://localhost/localprojects/codeignit...ews/create Can anyone explaining why this is happening... Thanks..
[eluser]Otemu[/eluser]
Hi, Are you using the form_open() function to build your form, if you are then you need to use something like form_open(news/add) which would produce the following url http://localhost/localprojects/codeignit...p/news/add If your building the form manually in your view then you can use <form method="post" accept-charset="utf-8" acti site_url('/news/add')?>" /> If you have a base_url set in your application\config then check that the path is correct
[eluser]Aken[/eluser]
Either you have a relative URL set in your form's action attribute, or your base_url config setting doesn't start with http:// |
Welcome Guest, Not a member yet? Register Sign In |