php code not working as it should

Discussion in 'HTML & Website Design' started by ShaquilleRay, Feb 3, 2011.

  1. #1
    Hi there for some reason in this section of php code <? require_once isn't working. I would much appreciate it if someone could help me :)

    echo "<table style='border:solid 1px #000000;'>
      <tr>
        <td style='border:solid 1px #000000;'>Total Submission Sites</td>
        <td style='border:solid 1px #000000;'>Server Status</td>
        <td style='border:solid 1px #000000;'>Plugin Version</td>
        <td style='border:solid 1px #000000;'>Latest Update</td>
      </tr>
      <tr>
        <td style='border:solid 1px #000000;'>test</td>
        <td style='border:solid 1px #000000;'>test</td>
        <td style='border:solid 1px #000000;'>test</td>
        <td style='border:solid 1px #000000;'> <?php require_once('http://wert.in/pluginfiles/files/v101/v101.php') ?></td>
      </tr>
    </table>";
    }
    Code (markup):
     
    ShaquilleRay, Feb 3, 2011 IP
  2. s_ruben

    s_ruben Active Member

    Messages:
    735
    Likes Received:
    26
    Best Answers:
    1
    Trophy Points:
    78
    #2
    Change the code to this:

    
    ?>
    <table style='border:solid 1px #000000;'>
      <tr>
        <td style='border:solid 1px #000000;'>Total Submission Sites</td>
        <td style='border:solid 1px #000000;'>Server Status</td>
        <td style='border:solid 1px #000000;'>Plugin Version</td>
        <td style='border:solid 1px #000000;'>Latest Update</td>
      </tr>
      <tr>
        <td style='border:solid 1px #000000;'>test</td>
        <td style='border:solid 1px #000000;'>test</td>
        <td style='border:solid 1px #000000;'>test</td>
        <td style='border:solid 1px #000000;'> <?php require_once('http://wert.in/pluginfiles/files/v101/v101.php') ?></td>
      </tr>
    </table>
    <?php
    }
    
    PHP:
     
    s_ruben, Feb 3, 2011 IP
  3. ShaquilleRay

    ShaquilleRay Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi there.

    Thanks for your help s_ruben :D

    now it works. Thank you so much :)
     
    ShaquilleRay, Feb 3, 2011 IP
  4. AtSeaDesign

    AtSeaDesign Active Member

    Messages:
    172
    Likes Received:
    2
    Best Answers:
    1
    Trophy Points:
    93
    #4
    one word of advice. Do NOT use inline styles. If you have a surrounding div around the table use:

    
    #div id td {border:solid 1px #000}
    
    Code (markup):
    if you don't have the div, set a class inside the td's

    
    .cell {border:solid 1px #000}
    
    <td class="cell">
    
    
    Code (markup):
    here's a sample to add a border around the table and the table cells

    
    table{border-collapse:collapse}
    table ,table td {border:1px solid #000}
    
    Code (markup):
     
    AtSeaDesign, Feb 3, 2011 IP