I'm developing a registration form using php and mysql.
I have no problem with insert command(it works, the record can be inserted) but the problem is 2 same records will be inserted when I press submit button. When I press refresh button, that problem also happen, could someone tell me what is wrong with my form.

There's nothing wrong with your form, this is a common problem that can occur. The best way round it is, before inserting the data into the database do a SELECT query to see if the registration information already exists:

i.e.

<?

$query = "SELECT FROM table_name WHERE username='$username' OR first_name = '$first_name'";
// Find whether username and firstname already exists (you may want to avoid this search on the password as some people may use the same password but have different usernames)
$result = mysql_query ($query);
$num_rows = mysql_num_rows ($result);

I have a registration form--> Fill in the name, organization, e-mail, contact no..etc then press Submit when finish.

A page will appear with message "Your record has been added to the database, thank you for registering"

When I check the database, '1' record has beed added (ok it's work), but when I press "Refresh/Reload" button on second page (Page with confirmation message) the record in hte database will duplicate as many Refresh button I press...Is this what they called "cookies" could U tell me how to avoid this...
Thanks a lot

You cannot avoid this unless you do what I said earlier, your PHP script does its thing when the page loads so when you refresh the page, it will do it again. To avoid duplicate entries do a SELECT query to check whether the users details are already in there.

Also, you could put this in the head tags to automatically redirect the user to another page after 5 seconds so they dont get a proper chance to refresh the page.

<meta http-equiv="Refresh"
content="5;url=http://www.yoururl.com">

Your page is only as smart as your PHP, it will only do what you tell it to do. If you tell it to insert records then it will do that and only that. Check out my code again, it will save you some problems with duplicate entries.