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
php unable to sent email
Hi, guys, I try to send a email through php but unfortunately the mail unable to sent. Here is my co
try catch error
I have been trying try catch but, I can't get it to work. The code opens a non existing file called
Mouseover to edit (Ajax)
hi friends, can anyone help with the code behind to get this application working, please in VB (new
progress bar...need expert opinion of experienced webmaster
Hey guys, quick question:
I want to display a progress bar when I upload files, but I am not
Deleted Delivery but material wont return
We deleted a delivery but the material its still pending.
We made a reverse goods movemen
how to populate a drop down box
Hi buddies!
PROCEDURE DOWNLOAD_REPORT_FORM (report_name varchar)
is
begin
DOWNLO
returning data from an ssh2_exec()
here's what i got.
$conn = ssh2_connect($this->_host);
ssh2_auth_password($c
listcube issue
Hi
I have a virtual cube ZREMOTE. I use Tcode "listcube" to retrieve contents. I use of the
Echo multiple lines of html code
Hi guys,
I would like to know if there is a way to echo multiple lines of html codes.
check how many commas the variable containing the query has between [i]select[/i
Hi...
iv made an sql table that contains id number - name of sql query and an sql query.
T