I stuck it in a Pipe and now im getting some new error which I still dont know about can u see anything wrong in this code or the origional. that i can use to fix this problem
new error is
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\apachefriends\xampp\webalizer\Gbooks\subs\bodySub.php on line 52
code with some changes
<table>
<tr ="leftTR">
<!--<td> <img src="../Images/adds/sub/<php echo $tempImg; ?>.gif" alt="subject Image" /></td>
<td><php echo $tempSub; ?></td>
-->
<td>
<?php
$sub = $myMod;
$sql = 'SELECT `module` , `subject` , `relation` , `relation_link` , `add_SubCat` , `intro` , `teaser` , `discription` '
. ' FROM `subjet_catogories` '
. ' WHERE`module` = "'.$sub.'" LIMIT 0, 30';
$result = mysql_query($sql) or die(mysql_error());
while($row = mysql_fetch_array($result)){
$tempSub = $row['subject'];
$tempImg=$row['add_SubCat'];
$tempMod = $row['module'];
$myPipe .=<<<PIP
<table width="100%">
<tr>
<td width="100%">
$tempMod;
</td>
</tr>
</table>
PIP;
}
print $myPipe;
// End of top section
?>
</td>
</tr>
<tr class="CenterTR">
<td>
<?php
$search = 'SELECT * '
. ' FROM `products` '
. ' WHERE `module` '
. ' LIKE \'Web Technologies\' LIMIT 0, 30';
$results= mysql_query($search) or die(mysql_error());
while($row =mysql_fetch_array($results)){
$product_id=$row['product_id'];
$book_title=$row['title'];
$book_author=$row['author'];
$book_publisher =$row['publisher'];
$book_subject = $row['subject'];
$book_price = $row['price'];
$_ava = $row['available'];
$book_ISBN = $row['isbn'];
$book_img = $row['img'];
$book_rating = $row['rating'];
$ava_Stock = $row['in_stock'];
$book_link = $row['html'];
$Sresults .=<<<RUS
<table width="100%">
<tr>
<td width="70%">
<h1 id="book_title">$book_title</h1>
<h3>by $book_author</h3>
<h3>Published by: $book_publisher </h3>
<h3>Subject Category: $book_subject </h3>
<div id="priceleft"><b>Price: £ $book_price <b></div></br>
<b>Available: $_ava</b> </br>
<div id="priceleft"><b>in Stock: $ava_Stock<b></div></br>
<emp>ISBN: $book_ISBN</emp>
<div id="priceleft">
<a href="cart/add-to-cart.php?$product_id" class="des">
<img src="/Images/buttons/button-addtobasket-small.gif" alt="Add to basket" class="cartbuttons" />
</a></br>
</div>
<div id="priceleft">
<b>Quality Rating: </b>
RUS;
for($i=0; $i< $book_rating; $i++)
{
$Sresults .= "<img src='Images/Stars/star2.gif' alt='rating' />";
}
$Sresults .= "</div>";
$Sresults .= "<hr width='80%' >";
$Sresults .= "</td>";
$Sresults .= "<td><a href='subs/books/$book_link'><img src='/Images/Books/$book_img' alt='$book_publisher' height='200' width='150'/></a> </br>";
$Sresults .= "<a href='subs/books/$book_link' class='des'> See Full description </a></td></tr><tr><td></td></tr></table>";
}
print $Sresults;
?>
</td>
<td></td>
<td></td>
</tr>
<tr class="RightTr">
<td></td>
<td></td>
<td></td>
</tr>
</table>