Jump to content

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().
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.