Chrisj Posted August 28, 2009 Share Posted August 28, 2009 I'm using a php script that has the ability to search by keyword. When I wanted the keyword to appear on a page called inner_results.htm I was told: "you'd have to look at search.php. and see if there is a line like: $_SESSION['keyword'] = $keywords; if there is something kinda like that then you're good. You would just add the sessions.php include to the results.php page, (include_once ('classes/sessions.php') then add something like: $keywords = $_SESSION['keyword']; then in the inner_results page, wherever you want the keywords to display, add something like: You searched: [var.keywords]" So, I followed this advice and on search.php I found this: $_SESSION['searched'] = $_GET['keyword']; And I see that on results.php it already has this: include_once ('classes/sessions.php'); And on the results.php page I added this: $keywords = $_SESSION['keyword']; And on the inner_results.htm page I added this: You searched: [var.keywords] But the inner_results.htm page only shows this: You searched: Can someone suggest what I should try to make this work? Thanks Quote Link to comment Share on other sites More sharing options...
ReKoNiZe Posted August 28, 2009 Share Posted August 28, 2009 Sounds like you just need to echo $keywords; Quote Link to comment Share on other sites More sharing options...
Chrisj Posted August 28, 2009 Author Share Posted August 28, 2009 Can you give me an example, please, of what you mean? thanks Quote Link to comment Share on other sites More sharing options...
ReKoNiZe Posted August 28, 2009 Share Posted August 28, 2009 For the inner_results.htm you might need to make that a .php extension and then do: echo "You searched $keywords"; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.