My form code isn't behaving as expected
Posted: Tue Sep 16, 2003 8:39 am
Bad code 
Ok, the below code is supposed to either present the form, or if the form has been filled, just say "hello", but when I hit submit, it brings the form back up. Any ideas?
Cheers for any help guys.
Ok, the below code is supposed to either present the form, or if the form has been filled, just say "hello", but when I hit submit, it brings the form back up. Any ideas?
Code: Select all
<?php
if ($c != 1)
{
?>
<form name="form1" action="search.php?=c">
<input name="search" type="text" id="search" value="Enter search here" size="50">
<input type="submit" value="Search!">
</form>
<?php
} else if ($c==1) {
echo ("hello");
};
?>