Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
I want the searched keyword to appear
Old 08-28-2009, 12:55 PM I want the searched keyword to appear
Extreme Talker

Posts: 216
Trades: 0
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
chrisj is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-28-2009, 03:26 PM Re: I want the searched keyword to appear
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,898
Name: Keith Marshall
Location: Connecticut
Trades: 0
Why wouldn't you use $keywords = $_SESSION['searched']; instead?
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to I want the searched keyword to appear
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.10416 seconds with 12 queries