Jump to content

Script causing another script not to display info


thefreebielife

Recommended Posts

This script:

<?php

        <table style="border:1px solid #0099CC; width:635px; font-size:12px; margin-left:80px;" cellpadding="2" cellspacing="0">
        <tr>
        <td colspan="4" style="border-bottom:1px solid #0099CC" bgcolor="#CC00FF"><div align="center"><strong>News</strong></div></td>
        </tr>
        <tr bgcolor="#CCEAEA">
        <td width="15%" style="border-bottom:1px solid #0099CC"><div align="center">Date </div></td>
        <td width="15%" style="border-bottom:1px solid #0099CC"><div align="center">User Posted</div></td>
        <td width="50%" style="border-bottom:1px solid #0099CC"><div align="center">Title</div></td>
        <td width="20%" style="border-bottom:1px solid #0099CC"><div align="center">View</div></td>
        </tr>
        <?
$sql = "SELECT * FROM news order by date DESC";
        $result = mysql_query($sql);
        $i=0;
        while($r=mysql_fetch_array($result))
        {       
                $i=$i+1;
                ?>
                <tr bgcolor="#<?= ($i++%2) ? 'FFFFFF' : 'F5F5F5' ?>">
                <td width="15%" style="border-bottom:1px dashed purple; border-right:1px dashed purple"><div align="center"><FONT SIZE="2"><? echo $r["date"]; ?></FONT></div></td>
                <td width="15%" style="border-bottom:1px dashed purple; border-right:1px dashed purple"><div align="left"><FONT SIZE="2"> <? echo $r["user"]; ?></FONT></div></td>
                <td width="50%" style="border-bottom:1px dashed purple; border-right:1px dashed purple"><div align="center"><FONT SIZE="2"><? echo $r["title"]; ?></FONT></div></td>
                <td width="20%" style="border-bottom:1px dashed purple; border-right:1px dashed purple"><div align="center"><FONT SIZE="2"><a href="viewnews.php?newsID=<? echo $r["newsID"]; ?>">View</a></FONT></div></td>
                </tr> 

                <? }
        if($i==0)
        {
                ?>
                <tr>
                <Td colspan=3 align="center"><FONT SIZE="2" COLOR="#FF0000"><B>There are news articles submitted.</B></FONT></Td>
                </tr>

                <? } ?>
        </table>        <p>     <p> php?>

 

Is causing this one..

<?php
        <table width="400" style="border:1px solid #0099CC; width:735px; font-size:12px; margin-left:30px;" cellpadding="2" cellspacing="0" class="reftable">
        <tr>
        <td colspan="2" style="border-bottom:1px solid #0099CC"><div align="center"><strong>Your Referrals </strong></div></td>
        </tr>
        <tr bgcolor="#CCEAEA">
        <td width="50%" style="border-bottom:1px solid #0099CC"><div align="center">Username</div></td>
        <td width="50%" style="border-bottom:1px solid #0099CC"><div align="center">Offer Status</div></td>
        </tr><? if ($count == 0) { ?>
                <tr>
                <td colspan="2"><div align="center"><font color="#FF0000">You Have No Referrals</font></div></td>
                </tr>
                <? } ?>

        <?
        //grab all the content
        while($r=mysql_fetch_array($result))
        {       
                $ruser=$r["username"];
                $roffer=$r["ostatus"];
                ?>
                <tr bgcolor="#<?= ($i++%2) ? 'FFFFFF' : 'F5F5F5' ?>">
                <td width="50%" style="color:#0099FF "><div align="center"><? echo "$ruser"; ?></div></td>
                <td width="50%"><div align="center"><? if ($roffer == 1) { echo "<font color=#009900>Offer Completed</font>"; }
                else if ($roffer == 0.2) { echo "<font color=red>Completed 1/5 Credits</font>"; }
                else if ($roffer == 0.4) { echo "<font color=red>Completed 2/5 Credits</font>"; }
                else if ($roffer == 0.6) { echo "<font color=red>Completed 3/5 Credits</font>"; }
                else if ($roffer == 0. { echo "<font color=red>Completed 4/5 Credits</font>"; }
                else if ($roffer == 0) { echo "<font color=red>Offer Not Completed</font>"; }
                else if ($roffer == 2) { echo "<font color=red>User Removed</font>"; }
               
                ?> </div></td>
                </tr>
                <? } ?>

        <?
        //grab all the content
        while($r=mysql_fetch_array($result))
        {       
                $ruser=$r["username"];
                $roffer=$r["ostatus"];
                ?>
                <tr>
                <td width="50%" style="color:#0099FF "><div align="center"><? echo "$ruser"; ?></div></td>
                <td width="50%"><div align="center"><? if ($roffer == 1) { echo "<font color=#009900>Offer Completed</font>"; }
                else if ($roffer == 0.2) { echo "<font color=red>Completed 1/5 Credits</font>"; }
                else if ($roffer == 0.4) { echo "<font color=red>Completed 2/5 Credits</font>"; }
                else if ($roffer == 0.6) { echo "<font color=red>Completed 3/5 Credits</font>"; }
                else if ($roffer == 0. { echo "<font color=red>Completed 4/5 Credits</font>"; }
                else if ($roffer == 0) { echo "<font color=red>Offer Not Completed</font>"; }
                else if ($roffer == 2) { echo "<font color=red>User Removed</font>"; }
               
                ?> </div></td>
                </tr>> 

                <? }  ?>
        </table>        <p>

 

 

Not to display any of the info called on.

 

I know this because if i take the top one out, the bottom works fine. these ARE in the same file

 

i am completely confused here. the "<?php's" arent really there

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.