+ Reply to Thread
Results 1 to 3 of 3




  

Thread: Duplicate php value problem

      
  1. #1
    I'm New! komrad is on a distinguished road
    Join Date
    June 16, 2008
    Posts
    4
    Rep Power
    0
    Feedback Score
    0

    Default Duplicate php value problem

    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

  2. #2
    The Force is Strong! tarponkeith has a spectacular aura abouttarponkeith has a spectacular aura abouttarponkeith has a spectacular aura abouttarponkeith has a spectacular aura abouttarponkeith has a spectacular aura about tarponkeith's Avatar
    Join Date
    February 25, 2008
    Location
    Florida
    Posts
    81
    Rep Power
    5
    Feedback Score
    0

    Default Re: Duplicate php value problem

    I'm not sure if the OP still needs the answer, but others might.

    Try something called PRG (or post->redirect->get)...

    Basically, use the POST method to send data to a page.
    That page then processes the information, then redirects the user to another page with any necessary values in GET form (page.php?out=variables).
    The receiving page simply displays the required output.

    Now, when a users refreshes their browser, they'll be on the output page, so they can refresh it as much as they want without interfering with your database, or doing any double-processing.

    learn basic poker terms, download css software, look up a smoothie recipe or learn php

  3. #3
    I'm New! AdnanAhsan is on a distinguished road
    Join Date
    April 17, 2009
    Posts
    12
    Rep Power
    4
    Feedback Score
    0

    Default Re: Duplicate php value problem

    are you looping? if so check your conditions. if you are trying to insert single row then dont use loops . just get values, assign to php variables, and using mysql query insert them into your db.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
WebTalkForums
WebTalkForums
Recent Forum Threads