htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 2: htmlArea 2 & 3 archive (read only): htmlArea v2.0:
how can I works with sql and htmlarea


The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.

 


deor
New User

Dec 4, 2004, 4:48 PM

Post #1 of 3 (1876 views)
Shortcut
how can I works with sql and htmlarea Can't Post

Hello, I need your help, I´m making a form, and in this I request for a text, this text is a htmlarea, and I don´t find how I can send this information to a sql database, I don´t understand what editor.js return or what variable I have to save in the database for I can get the same information in another page. The name of the textcamp doesn´t have the information i had submit.

Plase Help me!!!!


stse
New User

Dec 27, 2004, 5:26 PM

Post #2 of 3 (1729 views)
Shortcut
Re: [deor] how can I works with sql and htmlarea [In reply to] Can't Post

One way to do it is to create a separate ASP page (e.g. ExecuteQuery.asp) where you obtain the elements that was passed over as a form element and then run the queries there.

E.g. if your form method is "get", you will notice that the htmlArea information is just passed onto the destination page just like a regular form object.


lenbot
New User

Jan 4, 2005, 12:16 PM

Post #3 of 3 (1674 views)
Shortcut
Re: [stse] how can I works with sql and htmlarea [In reply to] Can't Post

I am going to assume you know a bit about php, atleast a tidbit. so I am not going to eplain much other than here ya go edit the way ya like it.


Code
  

<html>
<body>

<head>
<script language="Javascript1.2"><!-- // load htmlarea
_editor_url = ""; // URL to htmlarea files
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera') >= 0) { win_ie_ver = 0; }
if (win_ie_ver >= 5.5) {
document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');
document.write(' language="Javascript1.2"></scr' + 'ipt>');
} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }
// --></script>
</head>

<?php if (isset($_GET['productupdate'])): ?>


<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<textarea name="yourFieldNameHere" style="width:800; height:150">
</textarea>
<input type="submit" value="SUBMIT" />
</form>
<script language="JavaScript1.2" defer>
editor_generate('yourFieldNameHere');

<?php else: // Default page display

Include ('Yourdatabaseinformationhere.php');// Remember to include your database information who ever you do it

$ID = $_POST['yourFieldNameHere'];//get the information you posted
echo ($ID);//see so you know what went into the database
// If Page Info has been submitted
// add it to the database
if (isset($_POST['PROINFO'])) {
$yourFieldNameHere =$_POST['yourFieldNameHere'];
$sql = "INSERT INTO database SET
PROVALUELINK = '$yourFieldNameHere'";
if (@mysql_query($sql)) {
echo '<p> <META HTTP-EQUIV=Refresh CONTENT="0; URL=http://www.domain.com"></p>';//delete if you would not like the page to refresh A new
} else {
echo '<p> Error adding submitted name: ' .
mysql_error() . '</p>';
}
}
// When clicked, this link will load this page with the textareabox
echo '<p><a href="' . $_SERVER['PHP_SELF'] .
'?productupdate=1">Add A Product Know The Value Of The Link!</a></p>';


?>

<?php endif; ?>
</script>
</html>
</body>


 
 
 


Search for (options)