PDA

View Full Version : Need Help with php modification



glenna1984
07-22-2007, 03:03 PM
I have a working piece of php code, which I saved on my website with a .txt extension, so it could be read. It is at http://www.thebicyclesite.com/bikeclubslist.txt (save as .php).

I also have a suggestion from a forum as how to highlight search results. This mod works with the code and variables I already have.
This code is pasted, below.
I cannot figure out where to place this code.
I also cannot figure out what the code tags in square brackets do.

Can anyone help me?

=====

// get the query string



if ($_GET["psearch"] != "") {
$psearchquery = str_replace("?psearch=", "", str_replace($_SERVER['PHP_SELF'], "", $_SERVER['REQUEST_URI']));
} else {
$psearchquery = "" ;
}


// and then on prev, next, page links add this e.g. for prev page:


<a href="productslist.php?start=<?php echo $PrevStart; echo "&psearch=$psearchquery"; ?>"><b>Prev</b></a>