Login Retreive lost passwordRegister
Search

Forum Index / General / onSaved - run include

[ This topic is solved ]

  Mark Hay 06 December 11 / 12:19  
Changed at 06 December 11 / 14:39
Hi

Is it possible in an onSaved function to run a require_once or include e.g.

function Showdone($id)
{
// send out email to authoriser
require_once('actions/emailauthoriser.php');
// send out email to originator
require_once('actions/emailoriginator.php');

header("location: ../index.php") ;
}
?>

I cannot get the formhandler to recognise the require_once( or an include(. It just seems to bypass them, The purpose of this is to send an email of the form data to the person who completed it and carry out some further actions. Its easier to separate the code in to another script but I cannot get this to work - what am I doing wrong?

Ta

M

  Mark Hay 06 December 11 / 14:38  
Changed at 06 December 11 / 14:39
Hi

Is it possible in an onSaved function to run a require_once or include e.g.

function Showdone($id)
{
// send out email to authoriser
require_once('actions/emailauthoriser.php');
// send out email to originator
require_once('actions/emailoriginator.php');

header("location: ../index.php") ;
}
?>

I cannot get the formhandler to recognise the require_once( or an include(. It just seems to bypass them, The purpose of this is to send an email of the form data to the person who completed it and carry out some further actions. Its easier to separate the code in to another script but I cannot get this to work - what am I doing wrong?

[edit] this occurs even of the header is removed.
Ta

M

  Johan Wiegel (Admin) 08 December 11 / 10:11  
Changed at 08 December 11 / 10:22
Hi,

this should work.

What happens if you put a first lines

<?php
echo 'test';
die(); 
?>

in actions/emailauthoriser.php

does it show test??

  Mark Hay 08 December 11 / 11:31  
Hi Johan

Thx for the feedback - it does work - it appears to be an issue with my coding - As long as I know its functional then I can work out whats wrong.

Many thanks for a great product..

M

  Top


powered by PHP-GLOBE   © 2004 - 2012 FormHandler. All rights reserved.   -   Open source license