Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Cabbit

macrumors 68020
Original poster
Jan 30, 2006
2,128
1
Scotland
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?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.