<form method="get" action="<?php echo $_SERVER['PHP_SELF']?>">
<h3>Select your product and click submit</h3><br />
<select name="prod">
<option value="default">Select your product</option>
<option value="os">Operating Systems</option>
<option value="mobile">Smart Mobiles</option>
<option value="mobile">Computers</option>
<option value="shirt">Shirts</option>
</select><br /><br />
<input type="submit" value="Submit" name="submit"/>
</form>
<form method=get action=<?php echo $_SERVER[‘PHP_SELF’]?>> <h3>Select your product and click submit</h3><br /> <select name=prod>
Share
You could check if the value of the submit control exists.
This way, when the form will be posted the $_GET[‘submit’] will have a value, then you can know that the form was posted.