Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Problems passing variables in a header

I need to receive results of search from a header.



4:08 pm on Oct 13, 2004 (gmt 0)

10+ Year Member

I have moved to a new server, and am now having trouble with passing variables in the header. Could it be a setting in php.ini?

(from search page (I have concatinated all searchterms into $searchterms))

if (isset($searchterms)) {
header ("Location: [***.com...]

(from search results page)

if (isset($searchterms)) {
$query = "SELECT ..... MATCH(search_terms) AGAINST ('$searchterms') AS score FROM ... WHERE MATCH(search_terms) AGAINST('$searchterms') ORDER BY score DESC";

This was working fine on my old host! I am running PHP 4.2.2 and have register_globals off (I've tried altering that one)

variables_order = "EGPCS"
register_globals = Off
register_argc_argv = On

Can anyone help?!


4:25 pm on Oct 13, 2004 (gmt 0)

10+ Year Member

If the register globals are off you have to delcair the data. Are you passing them from a get or post form?

Get: $searchterms = $_GET['searchterms']
Post: $searchterms = $_POST['searchterms']


7:17 pm on Oct 13, 2004 (gmt 0)

10+ Year Member

Brilliant, thanks. Works now!

Featured Threads

Hot Threads This Week

Hot Threads This Month