Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8256531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:53:08+00:00 2026-06-08T01:53:08+00:00

Actually i want to add a small gif image over another image for the

  • 0

Actually i want to add a small gif image over another image for the latest added games. Means i have games site like this http://www.girlsgogames.com/ .. i want to add the NEW tag over an image for my recently uploaded games. Means whatever the latest 5 games i upload, for those games i want to add the new tag automatically…means whenever i upload new 5 games the new tag will come over on the latest games. I want to acheive this using php mysql..can anyone help me in this case..i have added small image for reference.enter image description here

I have added this code. please check it once..

    <div style="width:980px; float:left">
                <div class="upperLeftCorner980"></div>
                <div class="upperCenter980">
                  <div style="text-align:left">Today's Top <?php echo NEW_GAME_TITLE;?>
                  </div>
                </div>
                <div class="upperRightCorner980"></div>
                <div style="clear:both"></div>
                <div class="centerLeft980">
                  <div class="centerRight980">
                    <div class="boxContentDiv" style="height:100%">
                    <div style="width:373px; height:309px; float:left; margin-left:10px; padding-top:30px">
                    <center>
                    <script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxxx";
/* 336x280, created 1/21/11 hope page new games */
google_ad_slot = "xxxxxxxxxxxx";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

                    </center>
                    </div>
                        <div style='padding:3px'>
                            <?php
                       $gameQuery = mysql_query ("SELECT * FROM games ORDER BY id DESC LIMIT 16");

                                while ($gameRow = mysql_fetch_assoc($gameQuery)){
                                                                    if ($_SESSION['lang'] == 'fr'){
                                            $description = $gameRow['description_fr'];
                                        }else{
                                            $description = $gameRow['description'];
                                        }

            ?>
<div style='float:left; width:180px; height:160px; margin:5px;' title="<div style='font-size:12px; font-weight:bold'><b>Description:</b> <?php echo $description;?></div><div style='font-size:12px; font-weight:bold'><b><?php echo GAME_TIME_PLAYED_TITLE;?>:</b> <?php echo $gameRow['time_played'];?></div>" class='tooltip'>


<?php
    $x = 0;
foreach($gameRow as $game) {

//Below is line 65 where i am getting error..at exactly echo "<div class=''gameBGBox'>"

echo "<div class='gameBGBox'><a href='<?php echo $confRow['sitePath'];?>play/<?php echo str_replace(' ','_',$gameRow['name']);?>'><img src='<?php echo $confRow['sitePath'];?>games/images/<?php echo $gameRow['img_100x75'];?>' width='180' height='135' border='2' alt='<?php echo $gameRow['name'];?>'/></a>";
    if($x<5){
    echo '<div class="new"></div>';
    }
    echo "</div>";
    $x++;
}
?>               </div>
                            <?php } ?>
                            <div style='clear:both'></div>
                           </div>
                    </div>
                  </div>
                </div>
                <div class="lowerLeftCorner980"></div>
                <div class="lowerCenter980"></div>
                <div class="lowerRightCorner980"></div>
                <div style="clear:both"></div>
                <div style='height:5px'></div>
                <!-- Separator -->
        </div> 

I am getting this error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\xampp\htdocs\myproject\main.php on line 65

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T01:53:10+00:00Added an answer on June 8, 2026 at 1:53 am

    Retreive the list ordering by the id:

    select * from games order by id desc
    

    Then loop trhough it:

    <ul id="game_list">
        <?php
            $count = 0;
    
            foreach($games as $game) {
                echo '<li><img src="' . $game['img_location'] . '" />';
    
                if($count < 5) {
                    echo '<div class="new"></div>';
                }
    
                echo '</li>';
                $count++;
            }
        ?>
    </ul>
    

    And the CSS:

    #game_list {
        list-style: none;
    }
    
    #game_list li {
        position: relative;
        z-index: 1;
    }
    
    .new {
        position: absolute;
        top: 0;
        right: 0;
        width: 80px; /* w of new banner img */
        height: 80px; /* h of new banner img */
        background: url(../img/new_banner_img.png) 0 0 no-repeat;
        z-index: 2;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background: I want to add a login to my small site, which is an
I don't mean an alias or function. I actually want to add an entire
Actually i want that, suppose i have a colorcode #FF3366. How can i examine
I have posted 3 queries here. Actually I want to join 1st & 2nd
I have a small problem with a script. I want to have a default
I've been asked to add a small AJAX feature to a clients site. Basically
hope all of you doing well. I have small question in C#.Net. actually i
Actually i want to add name of months(Using C sharp) along with value in
I have a posts controller on a small test website I'm making. I want
What I actually want to do is to broadcast a message over wifi (supposing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.