html text box taking data from database

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
rami
Forum Contributor
Posts: 217
Joined: Thu Sep 15, 2005 8:55 am

html text box taking data from database

Post by rami »

i have page which connected to database which retrives the datastored in the database...

and i have my index page as index.html which has navagation buttons and scrollbox in the side(whole page).

i want to feed the data from database to that textarea how can i do it....
i cannot copy all codes from html to php page...
or i am not being able to use php inside html
(i even use front page)
which has
<textarea rows="2" name="S1" cols="20">intial value</textarea>
for textarea
how can i do it
i think it can be done with those include....

the live example is
http://www.dmcinsights.com
User avatar
Buddha443556
Forum Regular
Posts: 873
Joined: Fri Mar 19, 2004 1:51 pm

Post by Buddha443556 »

If you are able to use .htaccess then you could try adding:

Code: Select all

AddType application/x-httpd-php .php .html
This would let you embed <?php ?> in .html files. There's a cost to this, all your .html file will now go through PHP before being output. So consider your .html traffic load though this is usually not a problem on new sites.

Could also make a index.php file and redirect.
Post Reply