www.webdeveloper.com
Results 1 to 4 of 4

Thread: Fatal error: Function name must be a string

  1. #1
    Join Date
    Mar 2012
    Posts
    1

    Fatal error: Function name must be a string

    Any ideas why I'm getting this error message?

    $tz = $_POST['tz'];
    $command = "UPDATE battery_repository SET repository_time_zone='".$tz."' WHERE repository_id='".$repository_id."'";
    $result = mysql_query($command, $admin_db);

  2. #2
    Join Date
    May 2004
    Location
    chennai, tamil nadu, India
    Posts
    451
    Can you post more of your code ? which line number you get the error ?

  3. #3
    Join Date
    Feb 2012
    Posts
    218
    The error also should return a line where it occurs. Check if you have a $ in front of a function like $explode('...')

  4. #4
    Join Date
    Apr 2012
    Posts
    1
    Hey guys. I'm getting the same error too. I am creating my first contact form with php. Here's what my code looks like currently below. The error comes from line 9. Hope anyone can help me with this because I am learning how to code websites from scratch using php.
    Code:
    <html>
    <body>
    <?php include '/www/zymichost.com/m/t/l/mtlproductions/htdocs/header.inc.php';?>
    <?php include '/www/zymichost.com/m/t/l/mtlproductions/htdocs/menu.inc.php';?>
    <?php if ($missing || $errors) { ?>
    <p class="warning">You did not enter the required information. Please try again.</p>
    <?php }; ?>
    <?php
    $errors();
    $missing();
    if ($isset($_POST['send'])) {
    $to = 'tate.mikey@gmail.com';
    $subject = 'New Feedback Received on MikeyTateLive Productions website';
    }
    $expected = array('name', 'email', 'comments');
    $required = array('name', 'comments');
    ?>
    <div id="wrapper">
        <div id="maincontent">
          <h2>I am here when you need me!</h2>
          <p>Enter the information below and click send. Hope to hear back from you soon. =)</p>
          <p>*=required</p>
        </div>
    </div>
    <form id="feedback" method="get" action="">
      <p>
        <label for="name">*Name:</label></br>
        <input name="name" id="name" type="text" class="formbox">
      </p>
      <p>
        <label for="email">Email:</label></br>
        <input name="email" id="email" type="text" class="formbox">
      </p>
      <p>
        <label for="comments">*Comments:</label></br>
        <textarea name="comments" id="comments" cols="60" rows="8"></textarea>
      </p>
      <p>
        <input name="send" id="send" type="submit" value="Send"
      </p>
      </form>
    <?php include '/www/zymichost.com/m/t/l/mtlproductions/htdocs/footer.inc.php';?>
    <?php include '/www/zymichost.com/m/t/l/mtlproductions/htdocs/processmail.inc.php';?>
    </body>
    </html>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles