Hi there, among the countless other questions that I have about php, this morning I experienced a problem that is wrecking my head. I have this form:
<form method="post" action="checkc.php">
<label for="findcust">Find customer by surname: </label>
<input type="text" name="findcust" id="findcust" class="tbox"><br />
<label for="findcomp">Find company name: </label>
<input type="text" name="findcomp" id="findcomp" class="tbox"><br/>
<input type="submit" id="btn" value="Find!"><br />
</form>
Now, in the checkc.php file I have some conditional expressions of the form:
if(isset($_POST['findcust']) && !empty($_POST['findcust'])) {..do stuff}
..and so on but i noticed that it never reaches the code inside the if, so i tried echoing out the &_POST['findcust'] and $_POST['findcomp'] and voila! it says undefined index..
Now I'm confused, since it was already working before and now all of a sudden this happened.. what am I missing again?
Is the post array not set to contain form elements with the key being the element name?