formating when pulling data from a mysql database
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.
upload only text files
hi guys i want to upload only text like like (pdf,note pad and ofiice files) so can any one please tell me how can i restrict that
download directory onto C drive
I am attempting (if this is possible) to write a routine to automatically dump the contents of a directory on the server into a directory on the local C drive.I started out like this :Code:
Page not Loading After Test
Hey AllIt seemed that an inlcude statement wasn't working for some reason, so I tried a more absolute file path:include("home/username/public_html/coding/scripts/carspecs.php")However this
BIG file upload!
Hey guys!I'm trying to upload a file, it works well with smaller files but with 60mb+, I get a POST size error even though I've raised POST max size:Code: ini_set( 'post_max_size', '500M' );This error
gather checkbox data from form into email
Hello all,First, i'd like to thank everyone who responded to my previous posts regarding setting up an SMTP server for my php form. I ended up figuring it out and my form is up and functioning,
How to generate a random array of integers subject to a certain constraint
I am writing a program that asks the user to enter an integer N and then generates a random array of integers of size 2^N, each of whose entries range from 1 to N+1. The final random array, however,
Passing JS to PHP
So I have the followingCode: <?phpgetdetails(?><script type="text/javascript">document.write(jsvariable)</script><?php );?>The idea is
True way to see if action was successful?
If this is a good way to see if action was successful to continue:Code: function changeGameState($GameId) { mysql_query("UPDATE challenges SET status=status+1 WHERE id='$GameId'");
Oracle Connectivity
Hi Every One,
Generate PDF
Hi guys,I would like to know if there is a way to generate pdf when clicking on a link. In fact, I would like to be able to click on a link and generate a pdf file with information from my database,