Welcome Guest, Not a member yet? Register   Sign In
Ajax form submit: Best way to handle post variables?
#1

[eluser]mhulse[/eluser]
Hi,

What is the best way to handle ajax post vars that are coming from an ajax form?

I built a view, for example:

site.com/class/function/param/param/param/

Here is where I am not sure how to proceed...

I have this form that submits to the above url:

site.com/class/function/

But what is the best way to pass the parameters? Should I just use $_POST[] like I would in standard (non-CI) PHP? Is there any CI code and/or standard approach to handling form submissions like this?

Is there any way I can utilize the code I wrote to handle the URI segments to also handle $_POST data? Kill two birds with one stone and minimal fuss type of thing?

My first thought was to use JS to change the form's action before submitting, but that just seems kinda ghetto.

Any tips would be very helpful. Smile

Thanks!
Micky


Messages In This Thread
Ajax form submit: Best way to handle post variables? - by El Forum - 01-25-2010, 12:51 AM
Ajax form submit: Best way to handle post variables? - by El Forum - 01-25-2010, 12:57 AM
Ajax form submit: Best way to handle post variables? - by El Forum - 01-25-2010, 01:15 AM
Ajax form submit: Best way to handle post variables? - by El Forum - 01-25-2010, 01:25 AM
Ajax form submit: Best way to handle post variables? - by El Forum - 01-25-2010, 01:29 AM
Ajax form submit: Best way to handle post variables? - by El Forum - 01-25-2010, 01:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB