Results 1 to 4 of 4

Thread: [Resolved]Call to undefined function Help

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    USA
    Posts
    432

    [Resolved]Call to undefined function Help

    Hello need a little help I keep getting an error "Fatal error: Call to undefined function rating_avg()"

    The function is in rating.php
    PHP Code:
    <?php
    function rating_avg($id)
    {
      
    //sample code
      
    $A $id;
      
    $B "rating ";
      
    $C $A $B;
      return 
    $C;
    }
    ?>
    The call page
    PHP Code:
    <?php require('rating.php');//header
    echo rating_avg($RPID);
    ?>
    Last edited by 308holes; Jun 25th, 2008 at 11:24 PM. Reason: [RESOLVED]

  2. #2
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: Call to undefined function Help

    try using include() instead.
    My usual boring signature: Something

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    USA
    Posts
    432

    Re: Call to undefined function Help

    Yea tried that too as well still same thing

  4. #4
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Call to undefined function Help

    I cannot see any reason why that code should not work. Can you zip up your files and attach them here?

Posting Permissions

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



Click Here to Expand Forum to Full Width