473,386 Members | 1,652 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Html In The Database??

Chrisjc
375 256MB
I was told the other day that I was able to place HTML in my database.. So I thought to my self that be grate for my feature points so I can use bullets... so I put the following code in one of my COL's just to see if it work here is the following code.

[HTML]<ul>
<li>Pro-GUARD 7 high flow, high efficiency filter media air filter</li>
<li>Increases horsepower up to 100 HP depending on application</li>
<li>Improves torque up to 112 lbs/ft depending on application</li>
<li>Maximizes airflow for better acceleration and responsiveness</li>
<li>Improved performance results in greater fuel efficiency</li>
<li>Installs in less than 60 minutes using factory mounting points</li>
<li>No cutting or drilling to engine compartment is required</li>
<li>Replaces OE air filter with high flow, high efficiency 360 degree radial flow air filter</li>
<li>Washable/reusable air filter with the deepest pleats in the industry is the largest possible in the space allowed</li>
<li>Replaces factory air box with a uniquely designed air box that allows the filter to be sized beyond factory limits</li>
<li>Replaces factory intake tube with a custom-designed intake tube that accelerates airflow to the turbo or throttle</li>
<li>Limited lifetime warranty</li>
</ul>[/HTML]


I know that is all right for bullets so I placed it in.. and I used this line here to make it display VIA the database using PHP

[PHP]<p align="center"><?php echo $fp1;?></td>[/PHP]

What happens when I run it all I get

"

yep just a " and thats it...

Anyone have any ideas? or be able to shine some light on this issue.

The server is running
phpMyAdmin 2.5.3
MySQL 4.1.14-standard

incase anyone needed to know no idea if that makes a diff and I have php5 on there.
Jan 10 '07 #1
3 1363
ronverdonk
4,258 Expert 4TB
I could find no problem in displaying the html from the db. I used the following code:[php]// connect server and db
$res=mysql_query("select html from xxx");
$row=mysql_fetch_assoc($res);
echo $row['html'];[/php]
So show the code you are using to get it out of the db and displaying it.

Ronald :cool:
Jan 10 '07 #2
Chrisjc
375 256MB
I could find no problem in displaying the html from the db. I sued the following code:[php]// connect server and db
$res=mysql_query("select html from xxx");
$row=mysql_fetch_assoc($res);
echo $row['html'];[/php]
So show the code you are using to get it out of the db and displaying it.

Ronald :cool:
I posted the code i am using above... thats what I have in the DB in my row for "fp1" so I have no idea.. are you saying I have to tell it there is HTML in the database?
Jan 10 '07 #3
ronverdonk
4,258 Expert 4TB
Things get confused. The following shows how I setup the table, inserted your data and extracted it again to be displayed.
[php]<?php
/*------------------------------------------------------
table was created and record inserted as the following:
--------------------------------------------------------
create table xxx (id int primary key auto_increment, html text);
insert into xxx values (0, '<ul>
<li>Pro-GUARD 7 high flow, high efficiency filter media air filter</li>
<li>Increases horsepower up to 100 HP depending on application</li>
<li>Improves torque up to 112 lbs/ft depending on application</li>
<li>Maximizes airflow for better acceleration and responsiveness</li>
<li>Improved performance results in greater fuel efficiency</li>
<li>Installs in less than 60 minutes using factory mounting points</li>
<li>No cutting or drilling to engine compartment is required</li>
<li>Replaces OE air filter with high flow, high efficiency 360 degree radial flow air filter</li>
<li>Washable/reusable air filter with the deepest pleats in the industry is the largest possible in the space allowed</li>
<li>Replaces factory air box with a uniquely designed air box that allows the filter to be sized beyond factory limits</li>
<li>Replaces factory intake tube with a custom-designed intake tube that accelerates airflow to the turbo or throttle</li>
<li>Limited lifetime warranty</li>
</ul>';
*/
//
// connect to server and db
// here I get the html text out of the db
$res=mysql_query("select html from xxx");
$row=mysql_fetch_assoc($res);
// and display it
echo $row['html'];
?>
[/php]
That's all!

Ronald :cool:
Jan 10 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Squirrel | last post by:
Given the following piece of code, I was looking for suggestions on how to beautify the portion of the HTML where I jump out of php mode and back in again. The HTML does not have any indenting in...
4
by: jason | last post by:
I would appreciate some help on how to convert a database table into an html file via FSO and whether more seasoned asp programmers recommned this route. The main reason I am attempting to do this...
4
by: Fergus O'Shea | last post by:
I have some text that appears in a Database. This text includes HTML(e.g. <br> tags). I also have a Webpage that makes an XML call to that database. But when the text is displayed on the page,...
2
by: ViperDK | last post by:
What is the best way for that? I store all Data in the original form in the Database. To prevent output fields (especially the fields everyone can use) to do bad things like killing the...
20
by: Guadala Harry | last post by:
In an ASCX, I have a Literal control into which I inject a at runtime. litInjectedContent.Text = dataClass.GetHTMLSnippetFromDB(someID); This works great as long as the contains just...
3
by: fjm67 | last post by:
I am new to PHP but not so new to Postgres. If someone can either direct me to some howto or even provide me with an example, I would be grateful. I would like to know if it is possible to...
2
by: Giedrius | last post by:
hi, i have an idea to make admin tool on home computer, that would generate html files using some kind of templates and database data and put these generated html files to public web server, witch...
14
by: jcage | last post by:
Is there any tutorials online for sending email through forms? I can send an email as well as write to my MySQL database from home with the following code but not at work. I think there might be...
18
by: agarwalsrushti | last post by:
Hi, Ive created a form in html and written code in hp tht takes data feom html and stores it in MySQL database. Bt wen i click on the submit button i get an error. Instead of storing it in database...
15
by: lxyone | last post by:
Using a flat file containing table names, fields, values whats the best way of creating html pages? I want control over the html pages ie 1. layout 2. what data to show 3. what controls to...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.