Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Sunday, September 26, 2021
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  POST Refresh or Reload solution:Use trigger to redirect view

phpMyEdit Configuration     POST Refresh or Reload solution:Use trigger to redirect view
Post new topic   Reply to topic    
 
david803     Joined: 10 May 2010   Posts: 6  
Post Posted: 2010-07-29 13:09
Back to top  Reply with quote     

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!

 
AezeDosc     Joined: 13 May 2020   Posts: 1  
Post Posted: 2020-05-14 11:39
Back to top  Reply with quote     

This project is full of twists for the team. The leader of the project must be vigilant and rush essay coupon in the shadow of the difficulties. The pros and cons of the project are met for the advantage of the entire slots for all humans.

 
CynthiaAshley     Joined: 19 Apr 2020   Posts: 56  
Post Posted: 2020-10-05 08:19
Back to top  Reply with quote     

I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. James Bond Wardrobe

 
jibad40681     Joined: 21 Oct 2020   Posts: 1  
Post Posted: 2020-10-21 08:47
Back to top  Reply with quote     

great post thanks for sharing this because its really informative very helpful for me The Christmas Chronicles 2 Mrs. Claus Coat

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy