Jump to content


Photo

Fatal error: Call to undefined function


  • Please log in to reply
3 replies to this topic

#1 miz_luvly@hotmail.com

miz_luvly@hotmail.com
  • Members
  • PipPipPip
  • Advanced Member
  • 41 posts

Posted 24 March 2006 - 04:50 PM

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

#2 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 24 March 2006 - 04:59 PM

Where is this function defined?
<?php  output_id($row['post_code'], TRUE); ?>

Ken

#3 redbullmarky

redbullmarky
  • Staff Alumni
  • Advanced Member
  • 2,863 posts
  • LocationBedfordshire, England

Posted 24 March 2006 - 05:00 PM

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
"you have to keep pissing in the wind to learn how to keep your shoes dry..."

I say old chap, that is rather amusing!

#4 Honoré

Honoré
  • Members
  • PipPipPip
  • Advanced Member
  • 66 posts
  • LocationAntwerp - Belgium

Posted 24 March 2006 - 05:00 PM

[!--quoteo(post=357958:date=Mar 24 2006, 06:50 PM:name=sab)--][div class=\'quotetop\']QUOTE(sab @ Mar 24 2006, 06:50 PM) View Post[/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().




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users