On one of the larger sites I've started to get prices from a MySQL database and insert them into pages using PHP. I now have the problem that DGS Search will only search a page as far as the price code. This means that although the whole page is displayed correctly in the browser any text after the price code is not searched. I'm pretty sure that there is nothing wrong with my code and wondered if anyone else had encountered this problem.
I extract the price from the database thus:
- Code: Select all
<?php $result = @mysql_query("SELECT price_exc_vat FROM products where product_code = 'CB501'"); { while ( $row = mysql_fetch_array($result) ) { $cb501exc=$row["price_exc_vat"]; }} ?>
An insert it thus:
- Code: Select all
<p class="2010">Our Price: <strong>£<?php echo "$cb501exc" ?> exc. VAT</strong> (per carton of 50 x 2 metre lengths)</p>
I'd appreciate any pointers here.
Best wishes,
Tim