php confusion

Discussion in 'Software' started by jarcher, May 14, 2007.

  1. jarcher

    jarcher I can't handle a title

    getting a double img/double link
    that shouldn't be there

    there something seems to be wrong in the code. .

    can you see it<?

    PHP:
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr>
        <td width="100%">
        <center>
        <img border="0" src="./images/online_spil.gif" width="450" height="75"></td>
      </tr>
    </table>
    <br>
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr>
        <td width="50%">
        <center>
        <img border="0" src="./images/puzzle1.gif" width="150" height="50"></td>
        <td width="50%">
        <center>
        <img border="0" src="./images/action1.gif" width="150" height="50"></td>
      </tr>
      <tr>
        <td width="50%">
        <table border="0" cellpadding="0" cellspacing="0" width="100%"><br>
    <?
    $champer 
    $this->ipsclass->DB->query("SELECT gid, gtitle, gname FROM ibf_games_list ORDER BY added DESC LIMIT 0,1");

    while(
    $goats=$this->ipsclass->DB->fetch_row($champer))

    {
    $game_id=$goats["gid"];
    $game_name=$goats["gtitle"];

    $content .= "<tr><td class='row1' colspan='1' width='25%'>
            <img src='arcade/images/
    {$goats['gname']}1.gif'></img></td>
            <td class='row1' colspan='1' width='75%' valign='top'><a href='index.php?autocom=arcade&code=play&g=
    $game_id'><b>$game_name</b></a></td></tr>";
    }
    echo 
    $content;
    ?>    </table>
        </td>
        <td width="50%">&nbsp;</td>
      </tr>
    </table>
    <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
      <tr>
        <td width="50%">
        <table border="0" cellpadding="0" cellspacing="0" width="100%"><br>
    <?
    $champer 
    $this->ipsclass->DB->query("SELECT gid, gtitle, gname FROM ibf_games_list ORDER BY added DESC LIMIT 1,5");

    while(
    $goats=$this->ipsclass->DB->fetch_row($champer))

    {
    $game_id=$goats["gid"];
    $game_name=$goats["gtitle"];

    $content .= "<tr><td class='row1' colspan='1' width='25%'>
            <img src='./images/bullet_blue.gif' align='right'></img></td>
            <td class='row1' colspan='1' width='75%' valign='top'><a href='index.php?autocom=arcade&code=play&g=
    $game_id'><b>$game_name</b></a></td></tr>";
    }
    echo 
    $content;
    ?>    </table></td>
        <td width="50%">&nbsp;</td>
      </tr>
    </table>
     
  2. jarcher

    jarcher I can't handle a title

  3. Mada_Milty

    Mada_Milty MajorGeek

    Maybe a stupid question, but what's the scope of your $content variable?

    Looks to me like it is not being reset at the end of the first script, and your other titles are just being appended?

    Could be mistaken. It's been a long while since I worked with PHP... after echoing $content for the first time, does setting its value to null help?
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds