I am not 100% sure what you mean, but I'll try to help you. First, I hope that you got MySQL installed. Let's assume that you got a database called "mysite" with a table called "users" that contains two rows called "username" and "password". Both username and password is root.
mysql_select_db("mysite"); //Select the database mysite.
$username=mysql_real_escape_string($_POST[username]); //mysql_real_escape_string protects you from sql injections that could "hack" your database.
$password=mysql_real_escape_string($_POST[password]); //if you name a input field password, it is avalible in the $_POST[password] variable
mysql_query("INSERT INTO users (username,password) VALUES('$username','$password')"); //The query that inserts everything to the database.
I didn't test this code, please reply if you receive any errors(or even better, solve them!).
thank you for giving me the code but i am new at php and all what i did on my hosting is that i created mysql database with the name but i did not define the name of any table so what do i need to do more
sorry for disturbing but as you know i am new at php and i dont know many things at it