I want to ask a best practice question. Suppose I have a form in php with 3 fields say name, email and comment. I submit the form via POST. In PHP I try and insert the date into the database. Suppose the insertion fails. I should now show the user an error and display the form filled in with the data he previously inserted so he can correct his error. Showing the form in it's initial state won't do. So I display the form and the 3 fields are now filled in from PHP with echo or such. Now if I click refresh I get a message saying "Are you sure you want to resend information?". OK. Suppose after I insert the data I don't carry on but I redirect to the same page but with the necessary parameters in the query string. This makes the message go away but I have to carry 3 parameters in the query string.
Yani benim soru:
Nasıl bunu yapmak için daha iyi? Ben sorgu dizesi parametre sürü etrafında taşımak değil, aynı zamanda bu hatayı almak istemiyorsanız. Bu nasıl yapılabilir? Ben form bilgilerini depolamak için çerezleri kullanmalısınız.