Getting params from a search page

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
PingLeeQuan
Forum Commoner
Posts: 58
Joined: Tue Sep 03, 2002 8:08 am

Getting params from a search page

Post by PingLeeQuan »

I have a page in my website that already does a search for shirt and pants material (i.e. color, buttons, size,....). Upon the user entering the information, the search page will display the result found in the database.

What i am trying to do is call this page from a master page and capture the result that the search page returns in my master page.

I am trying to avoid re-writting teh search criteria another time... any suggestions

thanks
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

You could do it in a main "varable page" in the same directory.

Make sure to include the file whatever.php into your page your calling.

Then request the function().

eg.

funcs.php

Code: Select all

<?php
function CheckTurns ($numturns) {
	global $users, $config;
	$turns2 = $configїmaxturns] + 1;
	if ($numturns > $turns2) 
		TheEnd('<span class="cbad">FATAL ERROR</span>: attempted to use more turns than avaliable!.');
	else if ($numturns > $usersїturns])
		TheEnd('<span class="cbad">FATAL ERROR</span>: attempted to use more turns than available!');		
}
?>
in a page called checkturns.php i would type this:

Code: Select all

include ("funcs.php");
and call the function within the page...

Code: Select all

checkturns (blablablabla);
?>
hope i helped ;)
PingLeeQuan
Forum Commoner
Posts: 58
Joined: Tue Sep 03, 2002 8:08 am

Post by PingLeeQuan »

thanks Oromian for your reply... to be hounest with you.... i understood what the code does but i do not think it is what i am looking for, unless i am mistaken. I looked up $_POST and i thought it might help.

any suggestions
Post Reply