apache 2.0.5
PHP Version 4.3.8
mysql 4.0.15
winXP
i have been having some weird problems with sessions and page redirects...
i have a search form, which is submitted when the user clicks on an image, that has an <a onlick="document.myform.submit()"> around it.
the form is submitted to another page, say x.php which , either shows search results or if no query was submitted, redirects to the home page.
one of two things happen - either an empty page appears, or the results page appears and just as the resutls have all been displayed, it redirects to the homepage!
within x.php the code is like:
if (formsubmitted)
{get result array from database}
else
{ header('location: index.php');
}
I have no clue why it redirects - with some echo statements i found that it first enters the if() part above, gets andshows the results then goes back (somehow), and gets into the else() part!
on a side note - in phpmyadmin, when i click on the 'structure' link, someimets the page seems to start blinking - like it was being refreshed again and again, and sometimes when i submit a query it goes to the results page and then suddenly redirects to the homepage and says 'No SQL Query!'
please help 🙁