Author Topic: "Fatal error: Function name must be a string in..." error *solved*  (Read 373 times)

0 Members and 1 Guest are viewing this topic.

Offline Zyncmaster2006Topic starter

  • Irregular
  • Posts: 8
    • View Profile
"Fatal error: Function name must be a string in..." error *solved*
« on: September 19, 2006, 10:38:55 PM »
Hi guys can you help me on this one? I have this function called ColApprovalInsert() and 2 files are using it namely col_approve.php and my dblib.inc and i can't figure out what made it to make such an error. Here they are---

col_approve.php:
<?php
//include("libs/loanlib.inc");
include("libs/dblib.inc");

 $_SESSION['memID'] = $_GET['memID'];
 $_SESSION['amount'] = $_GET['amount'];
 $_SESSION['principal'] = $_GET['principal'];
 $_SESSION['or_no'] = $_GET['or_no'];
 $_SESSION['loan_accnt_ID'] = $_GET['loan_accnt_ID'];
 $_SESSION['col_date'] = $_GET['col_date'];
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Cooperative Software v1.0::Loan Collection</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<?php include ("styles/mystyles.css"); ?>
<?php include ("libs/publicnav.inc"); ?>
</head>
<body>
<p align="center">Data is Stored!! Thank You!</p>
<p align="center"><a href="personal_or.php">Personal OR</a></p>
<?php
           $memID = $_GET['memID'];
           $amount = $_GET['amount'];
           $principal = $_GET['principal'];
           $or_no= $_GET['or_no'];
           $loan_accnt_ID = $_GET['loan_accnt_ID'];
           $col_date = $_GET['col_date'];
ColApprovalInsert($memID,$amount,$principal,$or_no,$loan_accnt_ID,$col_date,$loan_type_ID);
?>
<div id="footer"><?php include "footer.php"; ?></div>
</body>
</html>

dblib.inc:

function ColApprovalInsert($memID,$amount,$principal,$or_no,$loan_accnt_ID,$col_date,$loan_type_ID)
         {
         global $link;
         $query ="INSERT INTO loan_collection(members_ID,loan_type_ID,loan_accnt_ID,date,amount,principal,or_no)
VALUES ($memID, $loan_type_ID, $loan_accnt_ID, $col_date, $pay_period, $amount, $principal, $or_no ) ";
         $result($query,$link);
         }

   Can you tell where did I go wrong? Pls help me...
« Last Edit: September 20, 2006, 03:13:25 AM by Barand »

Offline Zyncmaster2006Topic starter

  • Irregular
  • Posts: 8
    • View Profile
Re: "Fatal error: Function name must be a string in..." error
« Reply #1 on: September 19, 2006, 10:53:30 PM »
sorry about that guys I just forgot to put mysql_query before ($query,$link) hehe sorry again