Welcome! Log In Create A New Profile

Advanced

Functions

Posted by Shaun2010 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
avatar Functions
April 15, 2011 09:04AM
Is it possible to call a function into another function or stop a function from executing because criteria from another function where not met?

A word to the wise ain't necessary - it's the stupid ones that need the advice.
Student Number:72793775
avatar
Mac
Re: Functions
April 15, 2011 09:27AM
You first need to call the parent function.
Language: PHP
function one () { function two () { echo "2"; }   echo "1"; }   two(); //Fatal error: Call to undefined function 2()   one(); // 1 two(); // 2 ?>

2nd part.. mmmm what do you want to do?
avatar Re: Functions
April 15, 2011 09:29AM
I want to create a validation function to use on multiple insert/update functions instead of adding validation into each of them separately

A word to the wise ain't necessary - it's the stupid ones that need the advice.
Student Number:72793775
avatar
Mac
Re: Functions
April 15, 2011 09:41AM
Why not just call a single validation function when required?
avatar Re: Functions
April 15, 2011 02:19PM
I couldn't get it to work like that this AM, however if I added the code before my queries it worked. Will mess around and get it sorted

A word to the wise ain't necessary - it's the stupid ones that need the advice.
Student Number:72793775
Sorry, only registered users may post in this forum.

Click here to login