first search the page for form elements like input and then start filling using a database with known names for these elements... Googling this will shure show you some results!
you can use cURL for POST variables to page . check cURL docs , also you will have more options to play with HTTP methods . such as : set cookies , keep sessions live , ... etc