Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 14th January 2013, 17:46
mare mare is offline
Junior Member
 
Join Date: Mar 2011
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default onBeforeInsert generating table value

Hello,

I use onBeforeInsert in my table_edit.php to generate a value which should be added to the database (will come from another subsystem so it's not available during the form input).

currently i do the following but thing there is a better solution .

Code:
function onBeforeInsert()
            {
              global $app 
              $app->tform->errorMessage = myfunction($_POST) ;
              $this->dataRecord['value'] = $_SESSION['value'] ;
              unset ($_SESSION['value']) ;
}
Code:
myfunction($_VAR) 
{
global $_SESSION ;
...
if (ok) 
$_SESSION['value'] = "foo";
(else)
return "error foo :-(" ;
}
Reply With Quote
Sponsored Links
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Courier Imap is not working HellMind General 5 12th April 2012 01:04
table lookup problem aurelius Installation/Configuration 5 2nd November 2011 19:12
server.sh not starting up tuxillo Installation/Configuration 8 31st December 2010 14:14
ISPConfig3 Mail Warn Errors reason8 General 3 25th November 2009 13:58
Howto analyse a IPTables firewall issue? chillifire Installation/Configuration 2 27th August 2008 07:23


All times are GMT +2. The time now is 00:06.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.