Lid |
|
hallo iedereen ik ben bezig met een script, het script ziet er zo uit:
<?php
include("../../fckeditor.php") ;
include("../../../config.php");
$id = $_GET['id'];
$select = mysql_query(" SELECT * FROM tekst WHERE id='". $id ."'");
$obj = mysql_fetch_object($select);
?>
<!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=utf-8">
<meta name="robots" content="noindex, nofollow">
<link href="../sample.css" rel="stylesheet" type="text/css" />
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<form action="post.php?id=<?php $id ?>" method="post">
<?php
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// $oFCKeditor->BasePath = '/FCKeditor/' ; // '/FCKeditor/' is the default value.
$sBasePath = $_SERVER['PHP_SELF'] ;
$sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "_samples" ) ) ;
$oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->BasePath = $sBasePath ;
$oFCKeditor->Value = $obj->tekst ;
$oFCKeditor->Create() ;
?>
</form>
</body>
</html>
<?php include("../../fckeditor.php") ; include("../../../config.php"); $id = $_GET['id']; $select = mysql_query(" SELECT * FROM tekst WHERE id='". $id ."'"); ?> <!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=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> </head> <body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> <form action="post.php?id=<?php $id ?>" method="post"> <?php // Automatically calculates the editor base path based on the _samples directory. // This is usefull only for these samples. A real application should use something like this: // $oFCKeditor->BasePath = '/FCKeditor/' ; // '/FCKeditor/' is the default value. $sBasePath = $_SERVER['PHP_SELF'] ; $sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "_samples" ) ) ; $oFCKeditor = new FCKeditor('FCKeditor1') ; $oFCKeditor->BasePath = $sBasePath ; $oFCKeditor->Value = $obj->tekst ; $oFCKeditor->Create() ; ?> </form> </body> </html>
en ik weet dat ik dit fout is:
<form action="post.php?id=<?php $id ?>" method="post">
<form action="post.php?id=<?php $id ?>" method="post">
ik krijg namelijk bij post:
http://www.mijndomein.nl/post.php?id=
hoe kan ik de id wel overnemen?
dus als bij editor.php id=1 is dat er dan komt te staan:
http://www.mijndomein.nl/post.php?id=1
|