Hi guys,
I have a bunch of these articles on my clients website
Articles
I have been working on a html form for editing them. i managed to find a textedit form on hotscripts.com
So far i have managed to get it working...
3 questions i have:
Why dosnt the title text field populate with the full title? "benefits of letting"
How do i pass the article data to the textArea
<html>
<head>
<script language="JavaScript" type="text/javascript" src="richtext.js"></script>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<?php
// Include config file
include('../common.php');
$link = dbConnect();
// Run query to pull news from the database
$query = "SELECT * FROM scArticles WHERE arID= '$arID'";
$result = mysql_query($query);
if (!$result) {
fail("Couldn't list Lets from database");
}
$let = mysql_fetch_array($result);
$arID = $let['arID'];
$arTitle = $let['arTitle'];
$arNews = $let['arNews'];
?>
<body>
<form name="form1" method="post" action="">
<table width="500" height="200" border="1" align="center">
<tr>
<td height="23" colspan="2">Article title:
<input name="textfield" type="text" value=<? echo $arTitle; ?> >
</td>
</tr>
<tr>
<td height="141" colspan="2" align="left" valign="top">
<script language="JavaScript" type="text/javascript">
<!--
initRTE("images/", "", "");
// Dosnt work
//writeRichText('rte1', '<?php echo $arNews; ?>', 500, 200, true, false);
writeRichText('rte1', 'Article should appear here....', 500, 200, true, false);
//-->
</script>
</td>
</tr>
<tr>
<td width="652" height="23"> </td>
<td width="56"><input type="submit" name="Submit" value="Submit"></td>
</tr>
</table>
</form>
- Is it possible to update the exsisting html page on the server.
Normally i would pull the pages from db as and when required but the client would rarther i use the html pages.
Anyone
thanks
Paul