Also das hier ist mein Code. Klappt auch alles so weit, zeigt mir keinen Fehler an, aber schreibt einfach nicht in die Datenbank. Ich habe schon mal ein Registerscript gemacht und da klappt alles. Keine Ahnung warum hier nicht.
Ich habe das so. Eine Datenbank usr_web128_1 und 2 Tabellen. Einmal register (da klappt alles) und einmal news, das will er nichts reinschreiben.
|
PHP Source code
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
<table width="641" height="77" border="0" cellpadding="0" cellspacing="0" class="text">
<tr>
<td height="29" background="img/c1.jpg"><strong> Test-Seite » Admin » News » Überprüfen / Senden </strong></td>
</tr>
<tr>
<td background="img/c2.jpg"><table width="641" border="0" cellpadding="0" cellspacing="0" class="text">
<tr>
<td width="16"> </td>
<td width="611">
<?
$_POST["news_author"] = $news_author;
$_POST["news_time"] = $news_time;
$_POST["news_title"] = $news_title;
$_POST["news_content"] = $news_content;
$_POST["news_kind"] = $news_kind;
$_POST["news_source"] = $news_source;
$_POST["news_link"] = $news_link;
$_POST["news_links"] = $news_links;
$connect = mysql_connect(localhost, ***, ***);
mysql_select_db(***);
if(!$_POST["news_author"] or !$_POST["news_time"] or !$_POST["news_title"] or !$_POST["news_content"] or !$_POST["news_kind"])
{
echo "<br>Bitte folgende Angaben überprüfen:<br><br>";
}
if(!$_POST["news_author"])
{
echo "- Bitte Author überprüfen<br><br>";
}
if(!$_POST["news_time"])
{
echo "- Bitte Datum / Zeit überprüfen<br><br>";
}
if(!$_POST["news_title"])
{
echo "- Bitte den Titel überprüfen<br><br>";
}
if(!$_POST["news_content"])
{
echo "- Bitte die News überprüfen<br><br>";
}
if(!$_POST["news_kind"])
{
echo "- Bitte die Art der News überprüfen<br><br";
}
$truecheck = 1;
if($news_author != "" && $news_time != "" && $news_title != "" && $news_content != "" && $truecheck==1)
{
$query = mysql_query("INSERT INTO `news` (`news_author`,`news_time`,`news_title`,`news_content`,`news_kind`,`news_source`,`news_link`,`news_links`) VALUES ('$news_author','$news_time,'$news_title','$news_content','$news_kind','$news_source','$news_link','$news_links')");
echo "Danke";
}
else
{
echo mysql_error();
echo "Fehler";
}
?>
</td>
<td width="16"> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="29" background="img/c3.jpg"></td>
</tr>
</table>
|
Hier die ganze HP ->
http://hiphop-home.de/testseite
NICHT MEIN DESIGN, REINE TESTSEITE! Copyright bei
www.eod-area.de