PHP Display a search result from MySQL Search -
i have 3 php pages:
search.php
sets out form fields used query mysql databasequery.php
queries database variables set insearch.php
, , return result array (which can large array), redirectresult.php
result.php
, display results in table form. page not connected database, , page bookmarkable, ie if bookmarks page, display result again without quering database.
my problem don't know how make result page bookmarkable.. used session carry variable query.php
result.php
once browser closed, result page display nothing.
if can help, highly appreciated.
1. bookmarks:
know, browser bookmarks save link page, wise use $_get[]
variables fields in form every time 1 visits page, server know search parameters automatically url
eg.
$search = $_get["s"] //query database parameter $search
they bookmark link this:
www.example.com/result.php?s=snoopy
server know "snoopy" search term.
2. saving data
"if bookmarks page, display result again without quering database."
unless planning download information, don't think there way load data without querying database again. bet there's convoluted way hidden somewhere in browser cookies or that... don't think it's worth going far though.
Comments
Post a Comment