Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
What is wrong in my script ?
Old 08-15-2005, 06:56 AM What is wrong in my script ?
Extreme Talker

Posts: 160
Location: Netherlands
Trades: 0
Hello all ,

I have a problem in my coding and i just can't figure it out

I want that after 3 trailers it opens a new page like here
www.game-trailers.net/alltrailers.php

But here it won't work .
It must place it like this : http://www.game-trailers.net/listGen...ndo%20Gamecube but it won't
Here is the script:
PHP Code:
<?php
    
include_once ( 'header.php' );
    include_once ( 
'left.php' );
?>

<TD width="83%" rowSpan=3 vAlign=top>
<TABLE width="100%" cellSpacing=0 class=news>
<h1>Free Trailer Downloads : <?php echo $_REQUEST['genre']; ?></h1>
<p align="right">&nbsp; </p>
<p>&nbsp;</p>

<?php
    
if ( $_REQUEST['genre'] )
    {
    
// Determine gameCount (the total number of games that fall under this category)
    
$query $mainQuery " FROM trailerTable NATURAL JOIN trailerGenreTable WHERE genreId = ${_REQUEST['genreId']} LIMIT 2 ";
    
$result mysql_query $query ) or die ( mysql_error ( ) );
    while ( 
$row mysql_fetch_row $result ) )
            
DisplayItem $row[0], $row[1], $row[2], $row[3], $row[4], $row[5], $row[6], $row[7], $row[8], $row[9], $row[10], $row[13], $row[14], $row[15], $row[16], $row[1] );
    }
    
// If no result
    
if ( !$result )
        
// gameCount is 0
        
$gameCount 0;
    
// Otherwise
    
else
        
// gameCount is the number of rows
        
$gameCount mysql_num_rows $result );

    
// If we have more than 20 games dont display them all on one page
    
if ( $gameCount )
    {
        echo ( 
'<div align="center"><text>' );
        
// If we are not on the first page
        
if ( $from != )
            
// Previous page link
            
echo ( "<a href=\"?page=listGames&letter=$letter&from=".($from-2)."\">Prev page</a> " );

        
// Pages is gameCount / 20
        
$pages $gameCount 2;
        
// If it dosent go in eavenly
        
if ( $gameCount != )
            
// Add one
            
$pages++;

        for ( 
$i 1$i <= $pages$i++ )
        {
            
// If we are on this page then its not clickable
            
if ( $currentPage == $i )
                echo ( 
"$i&nbsp;" );
            
// So we are not on this page and it is clickable
            
else
                echo ( 
"<a href=\"?page=listGames&letter=$letter&from=".(($i-1)*2)."\">$i</a>&nbsp;" );
        } 
// End for loop

        // If we have more pages
        
if ( $from $gameCount )
            
// Next page link
            
echo ( "<a href=\"?page=listGames&letter=$letter&from=".($from+2)."\">Next page</a> " );
        echo ( 
'</text></div>' );
    } 
// End if $gameCount > 2
    
?>


    
</table>
<div align="center">
  <p><a href="http://www.game-trailers.net">&gt; Back to Homepage &lt;</a></p></div>
    <?php
    
include_once ( 'footer.php' );
?>
Thanks for the help
__________________
If you want to see
Please login or register to view this content. Registration is FREE
or you want to see
Please login or register to view this content. Registration is FREE

If you want to see or you want to see
Please login or register to view this content. Registration is FREE

Or want to see the new
Please login or register to view this content. Registration is FREE
.Or just want to play a
Please login or register to view this content. Registration is FREE
. more
Please login or register to view this content. Registration is FREE
or yo u can

Please login or register to view this content. Registration is FREE
.
You can visite one of our sites here
Please login or register to view this content. Registration is FREE





Last edited by Trailerdownload; 08-15-2005 at 01:07 PM..
Trailerdownload is offline
Reply With Quote
View Public Profile Visit Trailerdownload's homepage!
 
 
Register now for full access!
Old 08-15-2005, 08:43 AM
asm
Extreme Talker

Posts: 217
Location: UK.Lancashire(true)
Trades: 0
i think first you should use the php tags not quote

[php ]
//no space though

[/php ]
asm is offline
Reply With Quote
View Public Profile Visit asm's homepage!
 
Old 08-15-2005, 01:07 PM
Extreme Talker

Posts: 160
Location: Netherlands
Trades: 0
sorry will change now
__________________
If you want to see
Please login or register to view this content. Registration is FREE
or you want to see
Please login or register to view this content. Registration is FREE

If you want to see or you want to see
Please login or register to view this content. Registration is FREE

Or want to see the new
Please login or register to view this content. Registration is FREE
.Or just want to play a
Please login or register to view this content. Registration is FREE
. more
Please login or register to view this content. Registration is FREE
or yo u can

Please login or register to view this content. Registration is FREE
.
You can visite one of our sites here
Please login or register to view this content. Registration is FREE




Trailerdownload is offline
Reply With Quote
View Public Profile Visit Trailerdownload's homepage!
 
Reply     « Reply to What is wrong in my script ?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB 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.11799 seconds with 12 queries