david803
Založený: 10.05.2010
Príspevky: 6
Zaslal: 2010-07-29 13:09
Návrat hore
Odpovedať s citátom
|
If you use "POST" method on a form, when you press "F5" or browser's refresh button, You will obtain troublesome something,IE will warnning you:
to display the webpage again,Internet Explorer needs to resend the information you've previously submitted.
Here is my solution for this Refresh or Reload problem:
1.step one ==> add some triggers
$opts['triggers']['insert']['after'] = 'triggers.edit.php';
$opts['triggers']['update']['after'] = 'triggers.edit.php';
// Now important call to phpMyEdit
require_once 'phpMyEdit.class.php';
$obj = new phpMyEdit($opts);
2. step two ==> code in triggers.edit.php
<?php
if ($this->operation == $this->labels['Add']) {
$this->rec = mysql_insert_id();
}
$this->operation = $this->labels['View'];
$this->recreate_fdd();
$this->recreate_displayed();
return true;
?>
After you add a recorder,this would like to redirect to view detail for last mysql_insert_id.
sorry ,my english is very bad.
hope my code is helps!
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|