Witam mam ostatnimi czasy problem z moją stroną. Problem polega na tym że edytor nie chce wczytać obecnej wartości z bazy danych bez użycia funkcji „Odśwież” , próbowałem wczytywać stronę jeszcze raz za pomocą header ale to niestety nie pomaga…. Proszę o pomoc…
Oto kod edytora
<?php
include("../../fckeditor.php") ;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>FCKeditor - Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-2">
<link href="../sample.css" rel="stylesheet" type="text/css" />
<?
$query = "SELECT ID, ZAW_PAGES FROM `bdskt` where ID=1";
$zaw_bd .= $row[ 'ZAW_PAGES' ].'';
}
?>
</head>
<body>
<form action="edytor01_save.php" method="post">
<?php
$sBasePath = $_SERVER['PHP_SELF'] ;
$sBasePath = substr( $sBasePath, 0
, strpos( $sBasePath, "_samples" ) ) ; $oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->BasePath = $sBasePath ;
$oFCKeditor->Value = $zaw_bd;
$oFCKeditor->Create() ;
?>
<br>
<input type="submit" value="Zapisz">
</form>
</body>
</html>
A to strony zapisującej
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Save</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow">
<link href="../sample.css" rel="stylesheet" type="text/css" >
<?
?>
</head>
<body>
<h1>Zapisywanie...</h1>
<?php
$postArray = &$_POST ; // 4.1.0 or later, use $_POST
else
$postArray = &$HTTP_POST_VARS ; // prior to 4.1.0, use HTTP_POST_VARS
foreach ( $postArray as $sForm => $value )
{
else
$zapytanie = "UPDATE `bdskt` SET `ZAW_PAGES` = '$value' WHERE `id`='1'";
$syscomplitedi = "001";
if($syscomplitedi == "001")
{
header("Location: edytor01.php"); }
}
?>
</body>
</html>
Ten post edytował ArturEales 24.10.2010, 17:00:01