rasmus carlsen wrote:
> "Dan Storm" <shadyz@_REMOVETHIS_err0r.dk> skrev i en meddelelse
> news:470c75bd$0$69238$edfadb0f@dread12.news.tele.dk...
>
>> Der er jo ingen kode som angiver hvor fejlen kan være.
>> Vis os den kode der modtager og behandler de data du sender fra den
>> formular.
>
> - doh! Jeg var vist lidt træt. Som nævnt ryger noget af det i basen men ikke
> det hele ...
>
> ras
> -----------------
>
> <?php require_once('../Connections/cms.php'); ?>
> <?php
> function GetSQLValueString($theValue, $theType, $theDefinedValue = "",
> $theNotDefinedValue = "")
> {
> $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $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_insert"])) && ($_POST["MM_insert"] == "edit")) {
> $insertSQL = sprintf("INSERT INTO sideindhold (overskrift, billede) VALUES
> (%s, %s)",
> GetSQLValueString($_POST['overskrift'], "text"),
> GetSQLValueString($_POST['billede'], "text"));
>
> mysql_select_db($database_cms, $cms);
> $Result1 = mysql_query($insertSQL, $cms) or die(mysql_error());
>
> $insertGoTo = "index.php";
> if (isset($_SERVER['QUERY_STRING'])) {
> $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
> $insertGoTo .= $_SERVER['QUERY_STRING'];
> }
> header(sprintf("Location: %s", $insertGoTo));
> }
>
> $colname_rsSideindhold = "1";
> if (isset($_GET['id'])) {
> $colname_rsSideindhold = (get_magic_quotes_gpc()) ? $_GET['id'] :
> addslashes($_GET['id']);
> }
> mysql_select_db($database_cms, $cms);
> $query_rsSideindhold = sprintf("SELECT * FROM sideindhold WHERE id = %s
> ORDER BY id DESC", $colname_rsSideindhold);
> $rsSideindhold = mysql_query($query_rsSideindhold, $cms) or
> die(mysql_error());
> $row_rsSideindhold = mysql_fetch_assoc($rsSideindhold);
> $totalRows_rsSideindhold = mysql_num_rows($rsSideindhold);
> ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="
http://www.w3.org/1999/xhtml">
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
> <title>rediger topmenu</title>
> <link href="../styles.css" rel="stylesheet" type="text/css" />
> </head>
>
>
>
> <body>
> <table width="100%" border="0" cellpadding="0" cellspacing="0"
> class="layout">
> <tr>
> <td colspan="2" class="top"><h1>administrationsområde</h1></td>
> </tr>
> <tr>
> <td width="17%" class="top1"> </td>
> <td width="83%" class="top1"> </td>
> </tr>
> <tr>
> <td height="294" class="left"><p>rediger topmenu</p>
> <p>til admin-forsiden </p></td>
> <td class="middle"><p>rediger topmenu </p>
> <form id="edit" name="edit" method="POST" action="<?php echo
> $editFormAction; ?>">
> <table width="550" border="0" cellpadding="3">
> <tr>
> <td width="132">overskrift</td>
> <td width="400"><label>
> <input name="overskrift" type="text" id="overskrift" />
> </label></td>
> </tr>
> <tr>
> <td>tekst 1 </td>
> <td><label>
> <textarea name="tekst1" cols="70" rows="6"
> id="tekst1"></textarea>
> </label></td>
> </tr>
> <tr>
> <td>billede</td>
> <td><label>
> <input name="billede" type="text" id="billede" size="70" />
> </label></td>
> </tr>
> <tr>
> <td>tekst 2 </td>
> <td><label>
> <textarea name="tekst2" cols="70" rows="6" id="tekst
> 2"></textarea>
> </label></td>
> </tr>
> <tr>
> <td> </td>
> <td><label>
> <input name="gem" type="submit" id="gem" value="gem data" />
> </label></td>
> </tr>
> </table>
> <input type="hidden" name="MM_insert" value="edit">
> </form> <p> </p></td>
> </tr>
> </table>
> </body>
> </html>
> <?php
> mysql_free_result($rsSideindhold);
> ?>
>
>
> og her
>
> <?php
> # FileName="Connection_php_mysql.htm"
> # Type="MYSQL"
> # HTTP="true"
> $hostname_cms = "localhost";
> $database_cms = "cms";
> $username_cms = "root";
> $password_cms = "";
> $cms = mysql_pconnect($hostname_cms, $username_cms, $password_cms) or
> trigger_error(mysql_error(),E_USER_ERROR);
> ?>
>
>
>
Du tager slet ikke fat i tekst2 eller tekst1 nogen steder i din php kode.