ro1960
06-22-2006, 11:34 AM
I have been struggeling with this problem all morning and I really can't figure it out. I have used this many times in the past, it's very simple but not working this time.
I have a simple form to search a database:
<form method="post" action="result-list.php">
<input name="search-party" type="hidden" value="y">
<div style="padding:4px; border-style:solid; border-width:1px; border-color:#ccc; background-color:#fff">
<b>Find Parties:</b>
<input type="text" size="8" name="q">
<input type="submit" value="go!">
<br />
<div align="right">
<a href="submit-party1.php">List your party</a>
</div>
</div>
</form>
In the processing file, I check for the presence of the search-party, then include a chunk of code to search the DB:
if ($search-parties == "y")
{
include("result-parties.php");
}
Strangely, the if statement is ignored, whether or not $search-parties is passed and regardless of its value.
If I print $search-parties, it shows "0".
Any idea?
I have a simple form to search a database:
<form method="post" action="result-list.php">
<input name="search-party" type="hidden" value="y">
<div style="padding:4px; border-style:solid; border-width:1px; border-color:#ccc; background-color:#fff">
<b>Find Parties:</b>
<input type="text" size="8" name="q">
<input type="submit" value="go!">
<br />
<div align="right">
<a href="submit-party1.php">List your party</a>
</div>
</div>
</form>
In the processing file, I check for the presence of the search-party, then include a chunk of code to search the DB:
if ($search-parties == "y")
{
include("result-parties.php");
}
Strangely, the if statement is ignored, whether or not $search-parties is passed and regardless of its value.
If I print $search-parties, it shows "0".
Any idea?