by komrad
3 replies
Hello all,

I'm a learning php this year but i encounters some problems.

One of them is about php value. The problem is how do i do to prevent a php file from resending the same values into the database whenever the page is refreshed?

Anyone help?


Thanks,

Asep
#duplicate #php #php value
  • Profile picture of the author Emilian
    Check the database and see if the data is there already. If it is, then do not enter it, if it is not then enter it.
    {{ DiscussionBoard.errors[173117].message }}
    • Profile picture of the author Sean Kelly
      You can use a cookie or session variable to determine if the current page has already been submitted to decide if you should do an insert or not.

      Sean
      Signature
      http://javadocs.com - Javadocs
      {{ DiscussionBoard.errors[174127].message }}
      • Profile picture of the author Emilian
        Cookies can be changed client side and sessions can be hijacked. If you need something solid then check on the server side and not the client side. Otherwise you will end up with duplicate values.
        {{ DiscussionBoard.errors[174221].message }}

Trending Topics