Q: how to know which form is submitted by user in joomla How we know which form is submitted by a user after login.i.e after login user submitting the form then how we store information in db that which form is submitted by user in their current session.

A: Older post but wanted to update. What you should be using is this in your form:
<?php echo JHTML::_( 'form.token' ); ?>

Then process with:
JRequest::checkToken() or die( 'Invalid Token' );

See this Resource

A: In your form field create hidden element to pass user info and store it.
<input type="hidden" type="text" value="<?php echo USER_ID; ?>" name="user_loggedin_ID" />

Now where ever you are saving the form fields just add another field to store this value.

A: Hidden form is not secure, what if I change value of this to non numeric or anything i want?You can use $session =& JFactory::getSession(); to get current session. And store it into database and compare with current session. Read this http://docs.joomla.org/Accessing_the_database_using_JDatabase to know about handling database in joomla.
