ok in my database i have 1 field with text etc and a £ sign eg dog biscuits £10.00 kg when displayed on the screen from a query dont get the £ sign just a small square any idea what the problem is cheers Doug
What Lever said works, but to make it even better in your script put this - and it should do the exact same thing, but with everything on your pages. header("Content-type: text/html; charset=utf-8"); Code (markup):
ok that ok for main page but dosnt work in php ?> <h2>Online Order Form</h2> <h3>Just enter the Quantity you require</h3> <form action="formtoemailpro.php" method="post"> <table width="676" border="0" cellspacing="5" style="background:#ececec"> <thead> <tr> <th width="454">Product</th> <th width="10">Qty</th> </tr> </thead> <tbody> <?php while($product = mysql_fetch_assoc($result)): ?> <tr> <td> <?php echo $product['item'];?> </td> <td> <?php $product_name = ($product['item']); ?> <td width="146"><input type="text" name="orderline[<?php echo $product_name;?>]" /></td> </tr> <?php endwhile; ?> </tbody> </table> <table width="678" border="0" cellspacing="5" style="background:#ececec"> <tr><td width="230"><strong>YOUR DETAILS</strong></td> </tr> <tr><td>Name: <span class="style1">required</span></td></tr> <td><input type="text" size="30" name="name"></td></tr> <tr><td>Email address: <span class="style1">required</span></td></tr> <td><input type="text" size="30" name="email"></td></tr> <tr><td>Tel: <span class="style1">required</span></td></tr> <td><input type="text" size="15" name="tel"></td></tr> <tr><td>Comments:<td width="429"><textarea name="com" cols="25" rows="6" id="com"></textarea></td></tr> <tr><td> </td></tr> <td><input type="submit" value="Send"><font face="arial" size="1"> </font></td></tr> </table> </form> PHP: or does it need to be put in the above code cheers Doug
If your charset is Unicode (utf-8), as per advice given, best to use £ for the UKpound sign. Some old browsers (yes, there are people still using Netscape and IE5Mac !) may not like £. Chris
Why not store the price in a different row as the name. Make it a float/double type, and just hard-code the pound sign into your page. Why store more info than you need to?