homepage Welcome to WebmasterWorld Guest from 54.161.197.188
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Problems passing variables in a header
I need to receive results of search from a header.
RobOgden




msg:1279375
 4:08 pm on Oct 13, 2004 (gmt 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?!

 

Knowles




msg:1279376
 4:25 pm on Oct 13, 2004 (gmt 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']

RobOgden




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

Brilliant, thanks. Works now!
Rob

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved