You are not logged in.

wcf.regNote.message

Mirak

Beginner

  • "Mirak" started this thread

Posts: 30

  • Send private message

1

Monday, August 22nd 2005, 11:34pm

Will nicht in DB speichern...

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>&nbsp;&nbsp;&nbsp;Test-Seite &raquo; Admin &raquo; News &raquo; &Uuml;berpr&uuml;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">&nbsp;</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">&nbsp;</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

xundy

Beginner

Posts: 37

  • Send private message

2

Wednesday, August 24th 2005, 8:26pm

na dann drehe das mal rum:

Source code

1
2
3
4
5
6
7
8
          $_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;


sollte wohl eher so aussehen:

Source code

1
2
3
4
          $news_author = $_POST["news_author"];
          $news_time = $_POST["news_time";
          $news_title = $_POST["news_title"];
         usw usw


mfg

This post has been edited 1 times, last edit by "xundy" (Aug 24th 2005, 8:26pm)


Mirak

Beginner

  • "Mirak" started this thread

Posts: 30

  • Send private message

3

Wednesday, August 24th 2005, 9:20pm

geht auch nicht

xundy

Beginner

Posts: 37

  • Send private message

4

Wednesday, August 24th 2005, 9:45pm

hier fehlt noch ein '

Source code

1
'$news_author','$news_time,


mfg

Mirak

Beginner

  • "Mirak" started this thread

Posts: 30

  • Send private message

5

Friday, August 26th 2005, 7:08pm

Will auch nicht, aber irgendwie geht es manchmal und manchnam nicht, ka warum...

Djadjabing

Trainee

Posts: 90

Location: Düsseldorf

Occupation: Flugzeugabfertiger

  • Send private message

6

Friday, September 9th 2005, 7:38pm

Servus,

naja ich weis snet so recht aber gibts du auch reine zahlen an diene DB weiter? wenn ja könnte der fehler darin liegen das du in zeile 49 die punkte vergessen hast da du einen string? war doch so weiter gibst und der die punkte braucht...
?( Sie brauchen einen Computer nicht einzuschalten um festzustellen, ob WINDOWS installiert ist. Sehen sie einfach nach, ob die Aufschrift auf der Reset Taste noch lesbar ist. :lol:

wcf.user.socialbookmarks.titel