Please explain how to use forms/posting data |
[eluser]solepixel[/eluser]
I am having the hardest time using forms to perform the simplest of operations: using the code: Code: $formAttr = array('id' => 'new_account'); for some reason, using set_value() is still not retaining my post values. It's almost as if my page is doing a redirect after form variables are being submit. If i try to refresh after a POST, i do not get the dialog "Are you sure you want to resend post data.. blah blah blah". The only way i could get it to work is to post from /onepage/ to /onepage/?withquery and that would retain my post variables. however posting from /onepage/?withquery to /onepage/?withquery causes the same issue as before and loses post variables. Any ideas what is going on here?
[eluser]solepixel[/eluser]
Ok. so I've narrowed down the problem. In my .htaccess file, i'm adding a '/' to the end of the URL if it does not already end in a '/' or '.[ext]'. here's that code: Code: # If requested resource does not exist as a file well, this poses a problem when using form_open() + uri_string() because it automatically converts your action attribute to the FULL URL of the site (which is a bit rediculous). Somewhere during that process, the uri loses the '/'. So to solve this issue, in the config file, I changed this: Code: $config['url_suffix'] = "/"; I guess now I want to know why CodeIgniter uses the FULL SITE URL (http://blahblah/) on all functions like form_open() and anchor() etc. Also, why haven't they provided an option to disable this feature. It seems a bit useless. Why not just use '/' in place of 'http://garbledgoop/'. If it's not useless, i'd really like to know why it's done that way.
[eluser]CroNiX[/eluser]
set_value() is part of the validation library, are you using it in your controller? Post your controller. |
Welcome Guest, Not a member yet? Register Sign In |