Jump to content

Fatal error: Call to undefined function


Recommended Posts

Hi all,

Can someone help me solve this error plzzz :). my script seem to work fine but i am getting the following error.
Fatal error: Call to undefined function: output() in C:\Program Files\Apache Group\Apache2\test\form1.php on line 60

please refer to my code below, I am very advanced with php so plz excuse me if it a stupid mistake.

thanks in advance :)

<html>
<head>
<title></title>
</head>
<body>
<form name="myform" method="GET" action="form1.php">
<p>
ID:
<input type="text" size="5" name="keywords" id="post_code"/>
</p>
<input type=submit>
</form>

</body>
<?php
require 'conn.php';
if (isset($_GET['keywords']))
{
$sql = "select * from repactivity " .
"where repactivity.post_code = '".$_GET['keywords']."'";

$result = mysql_query($sql);
if (!$result)
{
echo 'Could not run query: ' . mysql_error();
}

if ($result and !mysql_num_rows ($result))
{
echo "<tr class='row1'><td>No results found that match the ";
echo "search term(s) '<strong>" . $_GET['keywords'] . "</strong>'";

}
else
{
while($row = mysql_fetch_array($result, MYSQL_BOTH))
{
echo "<input type='text' name='full_name' value=".$row['full_name'].">
<input type='text' name='report' value=".$row['report'].">
<input type='text' name='outstanding' value=".$row['outstanding'].">";
{
output_id($row['post_code'], TRUE);
}
}
}
?>
Link to comment
https://forums.phpfreaks.com/topic/5696-fatal-error-call-to-undefined-function/
Share on other sites

hi

1, i can see an error with output() in your error message, but can only see a call to output_id in your script
2, where is output_id or output defined? have you included the script with 'include' ?
3, why is your php code at the bottom of your page, outside the html '<body>' tags?

cheers
Mark
[!--quoteo(post=357958:date=Mar 24 2006, 06:50 PM:name=sab)--][div class=\'quotetop\']QUOTE(sab @ Mar 24 2006, 06:50 PM) [snapback]357958[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Hi all,

Can someone help me solve this error plzzz :). my script seem to work fine but i am getting the following error.
Fatal error: Call to undefined function: output() in C:\Program Files\Apache Group\Apache2\test\form1.php on line 60
[/quote]
Maybe you get this error message:
Fatal error: Call to undefined function: output_id() in C:\Program Files\Apache Group\Apache2\test\form1.php on line 60
and not:
Fatal error: Call to undefined function: output() in C:\Program Files\Apache Group\Apache2\test\form1.php on line 60

The reason is that you have a call to function output_id() but you have not written a function named output_id().

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.