Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Sobota, 28. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  POST Refresh or Reload solution:Use trigger to redirect view

phpMyEdit Configuration     POST Refresh or Reload solution:Use trigger to redirect view
Odoslať novú tému   Odpovedať na tému    
 
david803     Založený: 10.05.2010   Príspevky: 6  
Príspevok 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    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov