Welcome to WebmasterWorld Guest from 54.226.133.245

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)

New User

10+ Year Member

joined:Sept 30, 2004
posts:13
votes: 0


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)

Preferred Member

10+ Year Member

joined:Apr 17, 2002
posts:601
votes: 0


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)

New User

10+ Year Member

joined:Sept 30, 2004
posts:13
votes: 0


Brilliant, thanks. Works now!
Rob