I'm learning PHP so this might be a simple question to more expeienced
developers hopefully.
I have a findrecords.php page which has the following code which creates a
new record in a database table if this is the first time the user performs a
search:
// Web Session tracking
if (isset ($_SESSION['new_search'])) {
// nothing - we don't want to add a new record if this is set
} else {
$request = $fm->newAddCommand('web_sessions');
$result = $request->execute();
$recordID = $result->getFirstRecord()->getRecordId();
$_SESSION['new_search'] = "Yes";
$_SESSION['web_session_id'] = $recordID;
}
On the recordlist.php page which displays the search results there are 2
links:
1 - Continue searching - this should just go back to the findrecords.php
page and let the user do another search (this is working fine)
2 - New Search - this should take the user back to the findrecords.php page
and clear the $_SESSION['new_search'] variable only if that link is clicked.
I can't work out how you can pass some kind of parameter to the
findrecords.php page to indicate that the user has click the "New Search"
link? If I can capture that I can clear the variable but this one has me
stumped?
Many thanks,
Andrew