Reply
PHP Fatal Error: Help needed!
Old 04-16-2007, 04:59 PM Re: PHP Fatal Error: Help needed!
Average Talker

Posts: 18
Location: Boston, MA
Yay!

It's working.

Now I'm onto another error...


Fatal error: Call to undefined function landbanner() in /home/.poacher/blahblah/blahblah/templates/main.tpl on line 4

Main.tpl looks like this:

Quote:
<img src="<? echo URL; ?>templates/imgs/Hd.gif"><br><p>
<table border="0" width="100%">
<?php
landbanner();
$mresult = mysql_query("SELECT * FROM videos WHERE category='".$category."' ORDER BY title ASC");

while($row = mysql_fetch_array($mresult))
{
$id = $row['id'];
$title = $row['title'];
?>
<tr>
<td style="padding-left: 10px;"> •
<? if($seo == 0) { ?> <a href="<? echo URL; ?>videos.php?id=<? echo $id ?>"><? echo $title ?></a><br><img src="<? echo URL; ?>templates/imgs/spacer.gif"> <? } ?>
<? if($seo == 1) { ?> <a href="<? echo URL; ?>videos/<? echo $id ?>"><? echo $title ?></a><br><img src="<? echo URL; ?>templates/imgs/spacer.gif"> <? } } ?></td>
</tr>
<tr> <td><? echo landbanner(); ?></td></tr>
</table>
I'm concerned that I've created this error by adding in the previous snippets of code.

Does anyone out there see why this could be?

Last edited by spunko2010 : 04-16-2007 at 05:38 PM.
spunko2010 is offline
Reply With Quote
View Public Profile
 
Old 04-16-2007, 06:16 PM Re: PHP Fatal Error: Help needed!
tripy's Avatar
Fetchez la vache!

Posts: 1,981
Name: Thierry
Location: In the void
Now, probably that the landbanner() function was defined in a file that you previously excluded with the if(function_exists()).

I tell you, when it comes to function, you'd better have them grouped in a single file, and do include_once() to that file every times you may need them.
__________________
Listen to the ducky: "This is awesome!!!"

tripy is offline
Reply With Quote
View Public Profile
 
Old 04-16-2007, 06:42 PM Re: PHP Fatal Error: Help needed!
Average Talker

Posts: 18
Location: Boston, MA
Hi tripy

Yes thank you for your help, I re-read your post and it all works.

Still having problems with MySQL but I think I will have to post on another thread.

Thanks again
spunko2010 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to PHP Fatal Error: Help needed!

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11888 seconds with 12 queries