formating when pulling data from a mysql database
Posted on
16th Feb 2014 07:03 pm by
admin
Ok so Im not to sure if this is the right thread to post in but here is my catch 22 issue.
I have a test web page www.aandstech.com.au/test.php
Test.php pulls its content from a my sql table.
This works fine.
When I pull down the info without
Code: [Select]<pre>code to retrieve data from mysql database</pre>tags I loose all my formating ie carraige returns. However the justify works fine.
When I use my Code: [Select] <pre> tages to retrieve data from mysql database the carrige returns are fine however the text goes right accross the entire page and not within its div.
I have made some headway into resolving this issue by using Code: [Select]<pre width="80"></pre>However this fix looks fine in firefox 3 but has absoultley no effect in ie6 through to 8.0.
Anyway heres a snippet of my code any help would be greatley appreciated.
Code: [Select][color=red]<div class="body">
<p> <?php
$db =mysql_connect("localhost", "******", "*******");
mysql_select_db("*****_*****",$db);
$result = mysql_query("SELECT * FROM ***** WHERE id = 1",$db);
while($myrow = mysql_fetch_array($result))
{
echo "<pre width='80'>";
echo "<font face='Lucida Sans Unicode' size=2>";
echo $myrow["data"];
echo "</font>";
echo "</pre>";
}
?>
</p>
</div>[/color]
Another thing is that Im using css and any text pulled from a table doesn't use the css thats why I had to put the fonts in.
No comments posted yet
Your Answer:
Login to answer
338
21
Other forums
need to apply an if/else statement to Tim Thumb script
Not sure how to work this. I essentially want to call a variety of image sizes based on which style
Confused with Loop
guys, i got confused with Looping...this is the case
I have 3 stocks, let say "Stock A&q
How to copy a part of a vector in a raw memory
Hi,
How can I copy a part of a vector into a memory:
1
2
3
4
5
Images in email problem
I found this script for sending emails, it works but if the email has <img src="image.jp
Simple MySQL script is not working
Hey guys,
Just familiarizing myself with PHP and MySQL. I am following along in the O'Reilly
PHP - HTTP Digest Authentication - Understanding Code Help
Hi Everyone,
This is my first time on your website and please excuse if I am asking silly que
Help! refer to a friend script with captcha code
Hi guys, I am posting on here in desperate need for some help with an ongoing search I have been doi
How do i do multi uploads?.
Hey i would like to do this : http://hosting.mrkrabz.net/
I've got the base down you can uplo
Uploading/Downloading files stored in MySQL database
Hey all,
This problem just came up in my website and I'm having a hard time figuring out what
Comparing Values
Hi
I'm reading data from a database and this seems to work OK.
Each system has an associat