Welcome Guest, Not a member yet? Register   Sign In
CI Forms and HTTPS?
#1

[eluser]Vik[/eluser]
I'm using HTTPS for the first time, and I have a few questions about using it with forms.

I've tried using a hooks function, and also tried using .htaccess, to redirect all calls to my secure controller, from HTTP to HTTPS. However, I've found that a redirect seems to destroy the contents of the $_POST array, so it doesn't seem to be possible to use a redirect like this with HTTPS forms.

So next, I hardcoded HTTPS into the links on my site that go to my secure pages. This works pretty well. I can use the CI function "form_open('controller/function')", and the $_POST data is available to the controller after being submitted.

Now, the form data has credit card info in it. If the bank rejects the credit card info, I want to put the form back up, with an error message. From the controller, as usual, I use the CI function, "$this->load->view('my_views/my_form_view', $data); ".

It puts the form back up -- only, now I'm back in HTTP, instead of HTTPS!

Lots of people here must have dealt with this situation. What's the correct way to address this?

Thanks in advance to all for any info.


Messages In This Thread
CI Forms and HTTPS? - by El Forum - 01-08-2008, 11:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB