/    Sign up×
Community /Pin to ProfileBookmark

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

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@chrisranjanaMar 30.2012 — Can you post more of your code ? which line number you get the error ?
Copy linkTweet thisAlerts:
@hyperionXSMar 30.2012 — The error also should return a line where it occurs. Check if you have a $ in front of a function like $explode('...')
Copy linkTweet thisAlerts:
@m1k3yb0yApr 12.2012 — 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 = '[email protected]';
$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>[/CODE]
×

Success!

Help @lavalink spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...