form submit goes to wrong url |
[eluser]SPeed_FANat1c[/eluser]
Hi, I make a form opening: Code: echo form_open ('admin_/naujienos/redaguoti/'.$new_id.'/'.$offset); And when I press submit button it goes to url http://localhost/darzelis/admin_/naujienos0 I checked the source in browser, I have a good <form> tag Code: <form action="http://localhost/darzelis/admin_/naujienos/redaguoti/7/0" method="post"> I have only one form in my page. What is happening there? Maybe there is stupid mistake somewhere, I have no idea
[eluser]Bart Mebane[/eluser]
Code: <form action="http://localhost/darzelis/admin_/naujienos/redaguoti/7/0" method="post">
[eluser]SPeed_FANat1c[/eluser]
No, I have only set route for default controller Code: $route['default_controller'] = "home"; Edit: Found whrere is the problem - it did not like the method 'redaguoti'. I changed to 'redaguoti2' and now it sends to correct url. So I just need another method for submission. I wanted to generate form and save data with the same method. The method looks like this: Code: function redaguoti($new_id,$offset) So initialy form_validation->run() will be false, so it generates the form. After we submit, form_validation->run() should be true and save the data. But I guess I'll have to make another method for submiting data. Just curious, why it cannot work in the way I did? |
Welcome Guest, Not a member yet? Register Sign In |