php- new way of posting form
<p>im designing a way the form posts its data.</p>

<p>e.g if we have a login.php, if the user submit we normally post it back to login.php and process it. which means if we have other pages like register.php, editprofile.php, we have to redo the process again. so normally we would do something like this in each page:</p>

<pre><code>if($_POST["btnsubmit"]) {
//do smth
}
</code></pre>

<p>Im thinking of doing a common postForm.php which accepts all post requests, pass the data to the respective library and process it.</p>

<p>is this a good idea??</p>
