General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old March 3rd, 2003, 09:23 AM
Lizzy Lizzy is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: near Amsterdam
Posts: 10 Lizzy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question [EditWorks] multiple formfields

I've got EditWorksPro running! But i've got a problem.

I am making a CMS with a editnews page. The idea is that a popup window appears with a few fields which can be edit.
an input field '$inlezer' (this is the 'header')
and '$kop' will be opened in the WYSIWYG editor.

But for some reason $kop saves correctly but $inlezer won't be saved.


This is what i got:

PHP Code:
<?
include("ew/class.editworks.php");

$db0 = new mysqldb();
$query0="SELECT `id`, `kop`, `dag`, `maand`, `jaar`, `zichtbaar`, `inlezer` ".
        
"FROM `bvcnieuws` where id='$id' ";
$db0->setsql($query0);
$db0->selectquery();
$id $db0->result[0][0];
$kop $db0->result[0][1];
$dag $db0->result[0][2];
$maand $db0->result[0][3];
$jaar $db0->result[0][4];
$zichtbaar $db0->result[0][5];
$inlezer $db0->result[0][6];


$myEW = new EW;

$c mysql_connect($dbServer$dbUser$dbPass) or die("Couldn't connect to database");
$d mysql_select_db($dbName) or die("Couldn't select database");

if(isset(
$_POST['save']) && $_POST['save']=="true"
{
$kop $myEW->GetValue(true);

$result = @mysql_query("update bvcnieuws SET kop = '$kop', inlezer = '$inlezer' where id = '$id'");
echo 
"
<table width='610' border='0' cellpadding='0' cellspacing='0'>
<tr><td height='300'>&nbsp;</td></tr>
<tr>
<td align='center' class='sluit'>
De pagina is opgeslagen. <br><br><br><br>
<input type='button' value='Sluit venster' onClick='self.close()'></td></tr></table>"
;
}
else
{
$result mysql_query("select kop, inlezer from bvcnieuws where id = '$id'");

if(
$row mysql_fetch_array($result))
$data $row["kop"];
else
$data "";
$myEW->SetValue($data);
?>

<body background="images/back_pop.gif"onUnload="window.opener.location.reload()">

<div align="center"><img src="images/titel.gif" alt="" border="0"></div>

<form name="editor" action="popnieuws.php?id=<? echo($id?>" method="post">
<textarea class="inlezer" rows="5" name="inlezer"><? echo($inlezer?></textarea>
<?php
    
// These are the functions that you can call to hide varions buttons,
    // lists and tab buttons. By default, everything is enabled

    //$myEW->HideBoldButton();
    //$myEW->HideUnderlineButton();
    //$myEW->HideItalicButton();
    //$myEW->HideNumberListButton();
    //$myEW->HideBulletListButton();
    //$myEW->HideDecreaseIndentButton();
    //$myEW->HideIncreaseIndentButton();
    //$myEW->HideLeftAlignButton();
    //$myEW->HideCenterAlignButton();
    //$myEW->HideRightAlignButton();
    //$myEW->HideJustifyButton();
    //$myEW->HideHorizontalRuleButton();
    //$myEW->HideLinkButton();
    //$myEW->HideAnchorButton();
    //$myEW->HideMailLinkButton();
    //$myEW->HideHelpButton();
    
$myEW->HideFontList();
    
//$myEW->HideSizeList();
    //$myEW->HideFormatList();
    
$myEW->HideStyleList();
    
//$myEW->HideForeColorButton();
    //$myEW->HideBackColorButton();
    //$myEW->HideTableButton();
    
$myEW->HideFormButton();
    
//$myEW->HideImageButton();
    //$myEW->HideSymbolButton();
    //$myEW->HidePropertiesButton();
    //$myEW->HideCleanHTMLButton();
    //$myEW->HideGuidelinesButton();
    //$myEW->DisableSourceMode();
    //$myEW->DisablePreviewMode();
    //$myEW->DisableImageUploading();
    //$myEW->DisableImageDeleting();
    //$myEW->DisableXHTMLFormatting();
    //$myEW->DisableSingleLineReturn();
    //$myEW->HideRemoveTextFormattingButton();
    //$myEW->HideSuperScriptButton();
    //$myEW->HideSubScriptButton();
    //$myEW->HidePasteFromWordButton();
    //How do we want images to be inserted into our HTML content?
    //EW_PATH_TYPE_FULL will insert a link/image in this format: [url]http://www.mysite.com/test.html[/url]
    //EW_PATH_TYPE_ABSOLUTE will insert a link/image in this format: /myimage.gif
        
$myEW->SetPathType(EW_PATH_TYPE_FULL);
    
//Do we want images to appear in the image manager as thumbnails or just in rows?
    //EW_IMAGE_TYPE_ROW means just list in a tabular format, without a thumbnail
    //EW_IMAGE_TYPE_THUMBNAIL means list in 4-per-line thumbnail mode
        
$myEW->SetImageDisplayType(EW_IMAGE_TYPE_THUMBNAIL);
        
$myEW->EnableGuidelines();
    
//If the user isnt running Internet Explorer, then a <textarea> tag will be shown.
    //This function will set the rows and cols of that <textarea>
        //$myEW->SetTextAreaDimensions(60, 90);
    //Display the rest of the form
    
?>

<input type="hidden" name="save" value="true">
<?php $myEW->ShowControl(609370"/myimages"); ?>
<br>
&nbsp;&nbsp;
<!--<input type="submit" value="Save" align="left">-->
<input type="submit" name="submit" value="Save">

</form>
<?php
}
?>


can someone help me out?
I read somewhere about the editor not being inside a form??
What are the alternatives?

Reply With Quote
  #2  
Old March 3rd, 2003, 09:33 AM
Lizzy Lizzy is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: near Amsterdam
Posts: 10 Lizzy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Talking

nevermind


just had to put

PHP Code:
 $inlezer $_POST["inlezer"]; 

after
PHP Code:
 $kop $myEW->GetValue(true); 





i've been reading this forum and allllllll the articles for all day now..
and just when i decide to post because i'm going mental...

* sigh

Last edited by Lizzy : March 3rd, 2003 at 09:39 AM.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > [EditWorks] multiple formfields


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway