by TheEngineer » 02. February 2006 16:57
Also das einfügen in die Datenbank via verknüpfte Access-Tabell (über ODBC) geht einwandfrei. ich kann auch die Datenbank mit einem Tabellenformular auslesen. Geht auch wunderbar. Nur DAS Eingabeformular geht nicht
Benutzer und Passwort sind "user" Die Datenbank heisse gaestebuch und die Tabelle dort drin eingabe.
Die Formulare erstell ich über NAMO 5.5 hier mal der Code des nicht funktionierenden Eingabeformulares
Im Quellcode fragt er ab ob die Eingabefelder leer sind (if empty)
Aber wenn ich auf übertragen klicke und die Felder leer sind macht er noch nicht mal die Fehlermeldung
Hier mal der Code
<? // Namo WebEditor dbWizard Script.
// Copyright 1999, 2001 Namo Interacive Inc., All Rights Reserved.
// Do not modify this block.
// block_name :
// block_type : page header
// target : Windows, php, MySQL
// page_type : modify
// arg : eingabe.name, string, post, field
// arg : eingabe.text, string, post, field
// arg : processmode, int, post, page
$a_eingabe_name = $eingabe_name;
$a_eingabe_text = $eingabe_text;
$a_processmode = $processmode;
if ($a_processmode != 0) {
$w_checknull = 0;
if (empty($a_eingabe_name)) {
$w_checknull = 1;
echo("eingabe.name is NULL</p>");
}
if (empty($a_eingabe_text)) {
$w_checknull = 1;
echo("eingabe.text is NULL</p>");
}
if ($w_checknull != 0) {
echo("NULL is not allowed.");
exit;
} else {
}
}
$a_eingabe_name = stripslashes($a_eingabe_name);
$a_eingabe_name = str_replace("'", "''", $a_eingabe_name);
$a_eingabe_text = stripslashes($a_eingabe_text);
$a_eingabe_text = str_replace("'", "''", $a_eingabe_text);
require('wed_php_mysql.inc');
// checksum : 43609
?><html>
<head>
<title>eingabe.name(*)</title>
<meta name="generator" content="Namo WebEditor v5.0">
</head>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<p> </p>
<? // Namo WebEditor dbWizard Script.
// Copyright 1999, 2001 Namo Interacive Inc., All Rights Reserved.
// Do not modify this block.
// block_name : Eingabe-Formular
// block_type : input
// DataSrcURL : localhost
// DBName : gaestebuch
// server : gaestebuch
// userid : user
// passwd : user
// table : eingabe
// field : eingabe.name, string, not null, 10
// field : eingabe.text, string, not null, 10
// result_url :
if ($a_processmode != 0) {
$w_sqlstr = "INSERT INTO eingabe(text, name) VALUES(" . "'" . $a_eingabe_text . "'" . ", " . "'" . $a_eingabe_name . "'" . ")";
wed_db_process("localhost", "gaestebuch", "user", "user", $w_sqlstr);
echo("Der Eingabeprozess ist vollständig.");
exit;
}
// checksum : 14441
?>
<form method="post">
<table border="1">
<tr>
<td width="485">
<p>eingabe.name(*)</p>
</td>
<td width="485">
<p><? // Namo WebEditor dbWizard Script.
// Copyright 1999, 2001 Namo Interacive Inc., All Rights Reserved.
// Do not modify this block.
// block_name :
// block_type : input str
// arg_name : eingabe.name
// value :
// max_length : 10
// size : 12
// cache : "string"
wed_input_str("eingabe_name", WED_NULL_STR, 10, 12);
// checksum : 59671
?></p>
</td>
</tr>
<tr>
<td width="485">
<p>eingabe.text(*)</p>
</td>
<td width="485">
<p><? // Namo WebEditor dbWizard Script.
// Copyright 1999, 2001 Namo Interacive Inc., All Rights Reserved.
// Do not modify this block.
// block_name :
// block_type : input str
// arg_name : eingabe.text
// value :
// max_length : 10
// size : 12
// cache : "string"
wed_input_str("eingabe_text", WED_NULL_STR, 10, 12);
// checksum : 58958
?></p>
</td>
</tr>
<tr>
<td width="974" colspan="2">
<p><input type="submit"><input type="reset"><input type="hidden" name="processmode" value="2"></p>
</td>
</tr>
</table>
</form>
<p> </p>
</body>
</html>