Print Limit

Discussion in 'Web Design and Development' started by Cabbit, Jul 12, 2007.

  1. Cabbit macrumors 68020

    Cabbit

    Joined:
    Jan 30, 2006
    Location:
    Scotland
    #1
    PHP:
    <?php
    $host 
    "mysql10.streamline.net";
    $username "jennifersp";
    $password "s92630";
    $database "jennifersp";
    $server mysql_connect($host$username$password);
    $connection mysql_select_db($database$server);
    $db mysql_select_db($database$server);
    $id $_GET['id'];
    $sql mysql_query("SELECT SUBSTRING_INDEX(`body`, 1, 100) AS small FROM `storys` WHERE id = $id");
    $row mysql_fetch_row($sql);
    ?>
    <?php
    $usrname 
    $_GET['usrname'];
    ?>
    <div>
    <table width="100%" border="0" cellspacing="0" cellpadding="4">
      <tr>
        <td class="green">
    <a href="javascript:ajaxpage('../cls.php', 'story<?php echo $id ?>');">Close Preview</a>
    </td>
        </tr>
    </table>
    <table width="100%" border="0" cellspacing="0" cellpadding="4">
      <tr>
        <td width="100%" bgcolor="#ffffff">
    <?php
    print $sql;
    ?>
        </td>
      </tr>
    </table>
    </div>
    This is the code i got, its not printing i think im using the wrong command to print it?
     
  2. nightelf macrumors 6502

    Joined:
    Mar 25, 2003

Share This Page