You are not logged in.
Pages: 1
I am trying to use xinha to edit html from a mysql field.
I am putting the contents of the mysql field containing the html into a php variable and I need to get it to show in the editor so that it can be updated. Obviously placing this inside the textarea tag via php is not working.
Please can somebody tell me where I can get an idiots guide to help me
here is what I am doing so far
---------------------------------
$query="select * from articles where article_id='$article_id'";
$result=mysql_query($query)or die('could not select article');
$article_heading=mysql_result($result,0,"article_heading");
$article_text=mysql_result($result,0,"article_text");
mysql_close;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Metamorphosis Design Free Css Templates</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="../styles.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
_editor_url = "http://www.my_site.com/xinha/" // (preferably absolute) URL (including trailing slash) where Xinha is installed
_editor_lang = "en"; // And the language we need to use in the editor.
_editor_skin = "silva"; // If you want use a skin, add the name (of the folder) here
</script>
<script type="text/javascript" src="http://www.my_site.com/xinha/XinhaCore.js"></script>
<script type="text/javascript" src="http://www.my_site.com/xinha/my_config.js"></script>
</head>
<body>
<div class="bo_article">
<form action="edit.php" method="POST" id="bo_form" name="form1">
Heading<br>
<input type="text" class="bo_input" name="Heading" value="<? echo$article_heading;?>"/>
<br />
<br />
Article Content<br />
<textarea id="bo_textarea"></textarea><br />
<br />
<input type="submit" value="Save Article"></button>
</form>
</div>
------------------------------------------------
Thanks
Offline
I had tried echoing it in the textarea tag, which is where it should be.
Since found the problem with syntax. Everything working lovely now.
Thanks for you attention, sorry for being dim.
G
Offline
Pages: 1