Jump to content

Fatal Error: Function name must be a string


m1k3yb0y

Recommended Posts

Hey guys! I know there are a lot of topics about this, but mine is a bit different. I am creating my first contact form with php and I ran across this error after twinking with the php file:

Fatal error: Function name must be a string in /www/zymichost.com/m/t/l/mtlproductions/htdocs/Contact2.php on line 11

Here is what my code looks like currently:

<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>

 

I originally had lines 9 and 10 set up like this except for the php opening and closing tags, lol:

<?php
$errors();
$missing();
?>

 

But as you can see on my full code at lines 9 and 10, I made a minor change to it and now the error comes from line 11 instead of 9 and 10. And now I could use some help with this..... :confused:

Link to comment
Share on other sites

It's cool, just ignore the help we've given you, and provide a useless reply without trying to fix the error based on the advice you've been given from two people.

Very well. First off, I didn't try to echo $errors or $missing. Should I add a echo before them?

 

Btw, here is line 11. It is where the actual error now comes from.

<?php if ($isset($_POST['send'])) ?>

 

Also, I made some minor adjustments to lines 9 and 10.....

<?php
$errors = array();
$missing = array();
?>

Link to comment
Share on other sites

What are you TRYING to do??

 

You did the same thing with isset(). Functions do not have $ in front, unless the $name contains the name of a function.

Variables start with $, function names do not (unless you are using variable functions.)

Link to comment
Share on other sites

What are you TRYING to do??

 

You did the same thing with isset(). Functions do not have $ in front, unless the $name contains the name of a function.

Variables start with $, function names do not (unless you are using variable functions.)

Damn! I don't know why I put $ before isset! :facewall:

But it works now. Thanks!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.