Coding Help {PHP}

Discussion in 'PHP' started by secretsau, Aug 24, 2009.

  1. #1
    hello,

    this the code of a torrent search engine i have :

    <?php
    
    if ($i == 1) {
    
    $xxx = 1;
    
    echo '
    
    <div class="heading">Related Torrents</div>
    
    	<div id="resultsmain">';
    
    }
    
        		$verified = 'background: transparent url('._imgdir.'/accept.png) no-repeat scroll right center; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;';
    
    
    
    echo '
    
    	<div class="row">
    
    		<div class="name" style="';
    
    	
    
    	
    
    if (eregi('verified source', $aud[0])) {
    
        		echo $verified;
    
    				}
    
    $tlink = linkit($name, $id);				
    
    	
    
    echo 'width: 530px">'.$xxx++.' - <a href="'.$tlink.'">'.$name.'</a>
    
    		</div>
    
    		<div class="a">'.$dateposted.'</div>
    
    		<div class="s" style="width: 60px">'.$filesize.'</div>
    
    		<div class="u">'.$seeds.'</div>
    
    		<div class="d wide">'.$leechers.'</div>
    
    		<div class="clearfix"> </div>
    
    	</div>	
    
    ';
    
    
    
    if($i == $count) {
    
    echo      "</div><br /><br />";
    
    	}
    
    
    
    ?>
    PHP:
    the problem is, when i want to view the related torrents down the bottom of the page this error appeared :

    Fatal error: Call to undefined function linkit() in /home/findtorr/public_html/inc/print-related.php on line 18

    so, can anyone tell me whats wrong with my code?
     
    secretsau, Aug 24, 2009 IP
  2. iamben

    iamben Active Member

    Messages:
    116
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    73
    #2
    Yeah, you don't have a function called 'linkit'.
    This line:

    $tlink = linkit($name, $id);

    Is setting $tlink to whatever the linkit function returns. I'd guess it's meant to be making a link with the name from the ID, or something like that...
     
    iamben, Aug 24, 2009 IP
  3. JamesColin

    JamesColin Prominent Member

    Messages:
    7,874
    Likes Received:
    164
    Best Answers:
    1
    Trophy Points:
    395
    Digital Goods:
    1
    #3
    You're missing an include() at the top or a function declaration. As iamben said and the error message said, you're missing the linkit() function!
     
    JamesColin, Aug 25, 2009 IP