View Full Version : calling php function from seperate file

08-22-2006, 11:46 PM
Suppose i had a php file that ran every time one of 3 options were clicked... new, edit or delete.

I was to make it so that it passes a variable called $action that says either of the three options.


Form.php ==> when submit is clicked passes $Action = edit and loads Switch.php. From there switch passes through a bunch of switch case statements based on tha action and then finally calls the edit() function which is in functions.php.

the part i am unsure of is how to actually call the edit function which inlies in the functions.php file from the switch.php file

i am a coldfusion programmer and i know with coldfusion you can invoke coldfusion component files and pass a method (which would be the function) which hold all of the functions.. i'm just unsure how to do this in php.

Thanks in advance!

08-23-2006, 12:22 AM
include 'functions.php';