




When I test the search page, there is error message

Besides that, when I click on another paging such as page 2, It turn out nothing shown up.

Then, I follow the hint from error message, If I try to remove session_start from library/config.php, it will give me more errors.

I post my problems on some forums to achive some solutions. "phpacademy.info"

And get a advise.

and another one in forum "vninformatics.com"

and the solution.

After I get the advise, I move up the code line of "include/config.php" on the top of the page.

and test :

There is no error message but error paging is still appearing, when I click on page 2 for example, the page turns out nothing again:

I noticed that the address bar which is
http://yoongda.com/search.php?page=2&is missing search value, so address bar shoud show the link:
http://yoongda.com/search.php?page=2&search=a
and I got the solutions from a forum "dynamicdrive.com"


I added $_SESSION variable in search page:

and in common1 page:

I also changed my code following the advise in common1.php:
$strGet ='search'

and add the function "$_SESSION" in the paging links:


And I test my work:

It is working successfully.
No comments:
Post a Comment