How to use sub subfolder with Modular Separation ? |
[eluser]Kijer[/eluser]
Hello I have a little problem, I just created a form as below but when I "submit", I have the following error, I do not understand why ... Thank you in advance for your help. Code: <fieldset> he error generated and url .. An Error Was Encountered The URI you Has Submitted disallowed characters. URL -> http://dev.www.example.com/admin/annonce...submit=Add
[eluser]WanWizard[/eluser]
CodeIgniter doesn't use query strings unless you have enabled them, so a URL like that won't work. Change it to something like http://dev.www.example.com/admin/annonce...submit/add, and use the URI library to process the URI segments.
[eluser]Kijer[/eluser]
[quote author="WanWizard" date="1273886814"]CodeIgniter doesn't use query strings unless you have enabled them, so a URL like that won't work. Change it to something like http://dev.www.example.com/admin/annonce...submit/add, and use the URI library to process the URI segments.[/quote] I just do not want the $ _GET parameters, only submit POST. I do not want something complicated, just an ordinary form post. (and that data passing through the url). A simple form to add, based on my hierarchy admin, possible?
[eluser]WanWizard[/eluser]
If you want to pass variables through the URL, you have to use a URL like in my example, and use the URI library to get the information out. This is how CodeIgniter works. I miss the relation between between the URL that you gave, and the form example (which uses a completely different URL).
[eluser]Kijer[/eluser]
[quote author="WanWizard" date="1273887702"]If you want to pass variables through the URL, you have to use a URL like in my example, and use the URI library to get the information out. This is how CodeIgniter works. I miss the relation between between the URL that you gave, and the form example (which uses a completely different URL).[/quote] I'm not sure we speak the same purpose. I do not want to pass variables through url. I just want to make a simple standard form to record a new category in my database. So I have a form with an input text "name" and a submit button, I confirm that when inserted into the base and I get my news in my controller.
[eluser]WanWizard[/eluser]
Then you should ask the proper question. You started this thread with an error message, and I'm responding to that. My remark was that in your opening post you define a form with URL 'admin/annonces/categories/editer/', which looks ok, and an error message about the URL 'http://dev.www.example.com/admin/annonces/categories/?nom=&submit=Add', which is something completely different. Looking at the fields in your form example, it looks like a form with a GET method is generated, instead of with a POST method (that would create such a URL). Check the HTML of your from, does it say: Code: <form method="post" accept-charset="utf-8" action="admin/annonces/categories/editer/" />
[eluser]Kijer[/eluser]
[quote author="WanWizard" date="1273889125"]Then you should ask the proper question. You started this thread with an error message, and I'm responding to that. My remark was that in your opening post you define a form with URL 'admin/annonces/categories/editer/', which looks ok, and an error message about the URL 'http://dev.www.example.com/admin/annonces/categories/?nom=&submit=Add', which is something completely different. Looking at the fields in your form example, it looks like a form with a GET method is generated, instead of with a POST method (that would create such a URL). Check the HTML of your from, does it say: Code: <form method="post" accept-charset="utf-8" action="admin/annonces/categories/editer/" /> sorry if I am not very clear, I am French and it is already a feat to talk to you lol. Sometimes a pictures speak louder than words here is my problem. So I do not understand why I "http://dev.www.codeigniter.com/admin/annonces/categories/?nom=&submit=Ajouter+la+catégorie" which adds to the url and does not fill in the URL in the action. http://www.dailymotion.com/video/xdb4h9_demo2_tech
[eluser]WanWizard[/eluser]
As I said, what is actually defined in the HTML as method and action for the form?
[eluser]Kijer[/eluser]
[quote author="WanWizard" date="1273891287"]As I said, what is actually defined in the HTML as method and action for the form?[/quote] i've " Code: form_open('admin/annonces/categories/editer/') Code: form_open('folder/folder/controller/function/') I just tested my form on the base view (welcome) and it works .. As soon as I was testing in my view located in my admin, it makes these weird urls ..
[eluser]Zack Kitzmiller[/eluser]
You have $config['enable_query_strings'] set to true. All the CI helpers use that variable to decided how to build the forms. Your form_open(); is building the query string. set $config['enable_query_strings'] to false. (Also see 'Enabling Query Strings' here: http://ellislab.com/codeigniter/user-gui.../urls.html) |
Welcome Guest, Not a member yet? Register Sign In |