Jump to content

Pagination and $_POST question


Accurax

Recommended Posts

I'm posting some variables to a script that runs a search based on the POST variables that i assign to normal variables, but i also want to have the page paginated.

 

It all works, however, when i try to go to any page but the first, i get an error telling me that my post variables are undefined, the error code looks like this:

 

Notice: Undefined index: search_sex in C:\wamp\www\mydirectory\test.php on line 17

 

i get one of those for each of my POST variables.

 

I have tried to move the POST's into SESSIONS but it made no difference.

 

Is there a way around this?

Link to comment
https://forums.phpfreaks.com/topic/42534-pagination-and-_post-question/
Share on other sites

ive tried passing the variables into sessions to keep them alive, as i thought they were dying after the first page was moved on from.

 

problem is i could have 500 results, and i only want to display them in blocks of 10 or so per page, so i cant ignore this functionality.

 

no matter what i do it actually asks (see abover error) for the $_POST variable "by name" ... search_sex etc

 

all very confusing especially since the only time search_sex is even used on this page is when i assign it

 

$sex = $_POST['search_sex'];

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.