Confirming and Inserting Data with Forms

wxdqz

New Member
Hi,
I'm new to PHP and databases and looking for what I think is basic info. I know how make some basic forms, post data, and use SQL to insert it into a database.
I was wondering what the standard good practice for this stuff is... After a user enters data and clicks 'submit', I want to check the data and make sure it's ok, then insert it into the DB, then display a confirmation message in the browser. I want it so that when a user clicks refresh on the confirmation message, the new data DOES NOT get reinserted into the database...
This seems simple, but I'm a little confused. Is the this a PHP problem (i.e. should I be doing something to make sure that nothing can be submitted twice) or a DB problem (i.e do I need to change my database configuration so the same data can't be entered twice), or both?

thanks.
 
Back
Top