ryanc1256
ryanc1256

Reputation: 1085

php reload with all data

I need to reload the page with all the post data that gets sent to it, the post data is a array also which might make it a bit harder.

So this is the code that I use to reload the page. (this is the exact same page, so reloading the page)

//there is no data so lets do something as the ajax call is waiting for data
        header('Location: checkchat.php, true, 302);
        exit;

I need it to submit the array to the the same page, through ether POST, or GET and also, I cant print, any data out or my ajax request will return the data (which will be anything that the gets printed on the page).

The Array can have 200 values in it so I cant send it through GET well i could but it will unreasonable.

So the array is something like so...

array name = Friendslist

Upvotes: 0

Views: 185

Answers (2)

ryanc1256
ryanc1256

Reputation: 1085

OK, so it took longer that I thought, but did it. I just added it into a session that gets over written every time, and I pull the array out of this. Also It just refreshes the page like usual using...

 header('Location: checkchat.php, true, 302);
        exit;

Upvotes: 0

Rawkode
Rawkode

Reputation: 22592

Why do you need to POST the data? Why can't you store it server side and then redirect as normal?

Upvotes: 1

Related Questions