Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jan 2006
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    calling php function from seperate file

    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.

    Example:

    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!

  • #2
    Regular Coder
    Join Date
    May 2006
    Location
    Wales
    Posts
    820
    Thanks
    1
    Thanked 82 Times in 79 Posts
    PHP Code:
    include 'functions.php';
    edit(); 


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •