Results 1 to 3 of 3
Thread: Session Dropping
-
03-28-2006, 08:04 PM #1WHT Addict
- Join Date
- Jan 2004
- Location
- Mobile, AL
- Posts
- 138
Session Dropping
I have a search form that goes to search.php?page=1 (has pagination). At the top of search.php I have:
PHP Code:<?
session_start();
$_SESSION['keyword'] = $_POST["keyword"];
?>
Any ideas as to why this is happening? I'm not super great with sessions, but something simple like this should work.Shawn Kerr
-
03-28-2006, 11:25 PM #2WHT Addict
- Join Date
- Jan 2004
- Location
- Mobile, AL
- Posts
- 138
Well, I figured out I was going about it the wrong way anyway. I was trying to recapture what I had already posted and altered for the boolean search. So had it worked, I would have resubmitted the boolean search to be altered for boolean search another time.
But I realized just a few minutes ago that once the script terminates I lose my keywords altogether.
PHP Code:$keys = explode(" ", $_POST['keyword']); //back to original code w/o sessions
foreach ($keys as $newkey) {
$var[] = "+$newkey";
}
$newkeys = implode(" ", $var);
// $newkeys is now +keyword1 +keyword2 etc.
// mysql [fulltext] query with $newkeys works
// print results just fine
echo $newkeys; // empty, well actually just +
Shawn Kerr
-
03-29-2006, 01:51 AM #3WHT Addict
- Join Date
- Jan 2004
- Location
- Mobile, AL
- Posts
- 138
Oh well. I just passed everything through the URL. 2 minutes. No headaches.
Shawn Kerr