Lang geleden maakte ik websites met Dreamweaver en PHP . Nu wil ik een website op een andere Server plaatsen.Helaas moer er ergens hier een fout zitten want de pagina die vernieuwd moet worden laad niet.
Alleen het ID nummer komt tevoorschijn Dit is de code
-----------
<?php require_once('Connections/verbinding.php'); ?><?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
$updateSQL = sprintf("UPDATE `tbl_content` SET titel=%s, tekst=%s WHERE ID=%s",
GetSQLValueString($_POST['titel'], "text"),
GetSQLValueString($_POST['tekst'], "text"),
GetSQLValueString($_POST['ID'], "int"));
mysql_select_db($database_verbinding, $verbinding);
$Result1 = mysql_query($updateSQL, $verbinding) or die(mysql_error());
$updateGoTo = "admin/index.php";
if (isset($_SERVER['QUERY_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $updateGoTo));
}
$colname_rs_pagina = "-1";
if (isset($_GET['ID'])) {
$colname_rs_pagina = $_GET['ID'];
}
mysql_select_db($database_verbinding, $verbinding);
$query_rs_pagina = sprintf("SELECT * FROM `tbl_content` WHERE ID = %s ORDER BY ID ASC", GetSQLValueString($colname_rs_pagina, "int"));
$rs_pagina = mysql_query($query_rs_pagina, $verbinding) or die(mysql_error());
$row_rs_pagina = mysql_fetch_assoc($rs_pagina);
$totalRows_rs_pagina = mysql_num_rows($rs_pagina);
?><!DOCTYPE html >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Hoijtink Campers </title>
<link href="css/camper_bewerk.css" rel="stylesheet" type="text/css" />
<!-- TinyMCE -->
<script type="text/javascript" src="admin/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
content_css : "css/camper_bewerk.css",
plugins : "layer,table,advhr,advimage,imagemanager,advlink,emotions,iespell,insertdatetime,,media,print,contextmenu,paste,directionality,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave",
// Theme options
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,fontselect,fontsizeselect,nonbreaking",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
// Drop lists for link/image/media/template dialogs
template_external_list_url : "lists/template_list.js",
external_link_list_url : "lists/link_list.js",
external_image_list_url : "lists/image_list.js",
media_external_list_url : "lists/media_list.js",
});
</script>
<!-- /TinyMCE -->
</head>
<body>
<div class="wrapper">
<div class="content">
<div class="menubar">
<ul id="MenuBar1" class="MenuBarHorizontal">
<li><a href="index.php">Home</a> </li>
<li><a href="liberty.php">Liberty</a></li>
<li><a href="rimor.php">Rimor</a> </li>
<li><a href="voorwaarden.php">Voorwaarden</a> </li>
<li><a href="Calender">Reserveren</a> </li>
<li><a href="contact.php">Contact</a> </li>
</ul></div><div class="content primary">
<form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1">
<table align="center">
<tr valign="baseline">
<td nowrap="nowrap" align="right"> </td>
<td><?php echo $row_rs_pagina['ID']; ?></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Titel:</td>
<td><input type="text" name="titel" value="<?php echo htmlentities($row_rs_pagina['titel'], ENT_COMPAT, 'utf-8'); ?>" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Tekst:</td>
<td><textarea name="tekst" cols="60" rows="20"><?php echo htmlentities($row_rs_pagina['tekst'], ENT_COMPAT, 'utf-8'); ?></textarea></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"> </td>
<td><input type="submit" value="Update record" /></td>
</tr>
</table>
<input type="hidden" name="MM_update" value="form1" />
<input type="hidden" name="ID" value="<?php echo $row_rs_pagina['ID']; ?>" />
</form>
<p> </p></div>
</div>
<div id="footer">
<p>Marquee - © <?php echo date('Y'); ?></p>
</div>
</div>
</body>
</html>
<?php
mysql_free_result($rs_pagina);
?>