Welcome Guest, Not a member yet? Register   Sign In
ajax + POST method - sending PHP an array
#1

[eluser]nikefido[/eluser]
Hi all -

I have an ajax function using the POST method, sending POST data via the "send" method.

It is sending a string that resembles:

Code:
ajax.send("email[][email protected]&email;[][email protected]&email;[][email protected]");
//CI forums is adding the extra ";" in there!

Basically, we are trying to send PHP an array of emails to send multiple emails as part of a projects functionality.

However, in CI, I am testing for
Code:
$this->input->post('email');
//and
$this->input->post('email[]');
Both of which seems to coming up as false.

I am using:
Code:
ajax.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
so I don't believe that's the issue.


I was hoping someone might shed some light on the matter.


Messages In This Thread
ajax + POST method - sending PHP an array - by El Forum - 04-17-2008, 01:25 PM
ajax + POST method - sending PHP an array - by El Forum - 04-17-2008, 01:29 PM
ajax + POST method - sending PHP an array - by El Forum - 04-17-2008, 01:32 PM
ajax + POST method - sending PHP an array - by El Forum - 04-17-2008, 01:37 PM



Theme © iAndrew 2016 - Forum software by © MyBB