| phpMyEdit - Viewing Bug Advanced Details | [ Go Back ] | ||||
|
|
|||||
| ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
| 284 | documentation | feature | always | 2004-11-27 18:57 | 2004-11-27 22:02 |
|
|
|||||
| Reporter: | marianov | Platform: | Firefox | ||
| Assigned To: | OS: | Linux | |||
| Priority: | normal | Version: | |||
| Status: | acknowledged | Product Version: | 5.4 (stable) | ||
| Product Build: | Resolution: | open | |||
| Projection: | none | Duplicate ID: | |||
| ETA: | none | ||||
|
|
|||||
| Summary: | Browser refresh causes duplicate inserts. | ||||
| Description: |
When the user clicks refresh on the browser after an insert PME inserts a duplicated record in the table. I havent found a way to avoid it (aside from using a unique index, which is not always posible). In other php apps i have used something like: if (!isset($_SESSION['pcount'])) $_SESSION['pcount'] = 0; //$pcount is a "form post counter" function formrefresh() { return $_REQUEST['pcount'] != $_SESSION['pcount']++; } and then when building each form I add: <input type=hidden name=pcount value=<?=$_SESSION['pcount'] ; ?> > So before taking action I can check that the user is not submitting a form like this: if (!formrefresh() ) { //insert the record } else { // show a new empty form or redirect to the list of records } Do you think it would be easy to add this kind of feature to PME ? Thanks, Mariano |
||||
| Steps To Reproduce: | |||||
| Additional Information / Solution: | |||||
| Attached Files: | |||||
| Bug Notes | ||||
|
|
||||
|
|
|||
|
|
||||
|
|
|||
|
|
||||
|
|
|||