How to do this?

retrieve from db

Page 1 of 1

0 Replies - 629 Views - Last Post: 14 March 2009 - 06:39 AM Rate Topic: -----

#1 mandy011   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 70
  • Joined: 27-September 08

How to do this?

Posted 14 March 2009 - 06:39 AM

Hi guys ,
I am making a web page in which there is stuff which is retrieved from DB and displayed , that stuff in db contains html tags in it.
I want to provide an option due to which administrator can modify that homepage or webpage content information.
When i tried to code for it , the problem which i m facing is that all the information from DB is retrieved but not shown in textarea properly rather it displays complete HTML i.e. that information in DB after retrieval while putting values in textarea it is putting HTML. [b]suppose bold tag is used after which some data written and bold closed then while displaying it in textarea it's displayed bold text. Please give some idea.
The PHPMYADMIN works properly in this case i.e. if i open these table contains that works properly i.e. bold tag info close bold is displayed properly please guide me what to do
Posting some code please check it
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="1000" id="AutoNumber1" height="153">
	<td width="100" height="153">&nbsp;</td>
	<td width="700" background="newlogo.jpg" height="153">&nbsp;</td>
	<td width="100" height="153">&nbsp;<p>&nbsp;<p>&nbsp;<p>&nbsp;</td>
<table border=0 width=1000>
<td width=175>
<td width=700>
				You can Modify Existing News Here<br>
<form name='f1' id='f1' method='post' action=''>
<textarea rows='40' cols='200><?php
$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);

	if(!$link) {
		die('Failed to connect to server: ' . mysql_error());
	//Select database
	$db = mysql_select_db(DB_DATABASE);
	if(!$db) {
		die("Unable to select database");
	$qry="Select * from hp where id=2";

hey i found mistake
LOL i forgot to echo value :D sorry Guys.

This post has been edited by mandy011: 14 March 2009 - 06:36 AM

Is This A Good Question/Topic? 0
  • +

Page 1 of 1