Gegen Bilderklau - Das Original

Registrierung Mitgliederliste Teammitglieder Suche Häufig gestellte Fragen Statistik Chat Karte Zur Startseite

Gegen Bilderklau - Das Original » Design, Website, Copyright » Homepagehilfe » Homepagehilfe - Archiv » [PHP & MySQL] Daten werden nicht eingetragen » Hallo Gast [Anmelden|Registrieren]
Letzter Beitrag | Erster ungelesener Beitrag Druckvorschau | Thema zu Favoriten hinzufügen
Zum Ende der Seite springen Daten werden nicht eingetragen
Autor
Beitrag « Vorheriges Thema | Nächstes Thema »
Startpost-Retter
Mitglied


Dabei seit: 24.01.2011
Beiträge: 12.246
Herkunft: Gegen Bilderklau, intern

Daten werden nicht eingetragen Auf diesen Beitrag antworten Zitatantwort auf diesen Beitrag erstellen Diesen Beitrag editieren/löschen Diesen Beitrag einem Moderator melden       Zum Anfang der Seite springen

Ich mal wieder. Dieses mal habe ich das Problem,dass bei meinem Lexikon Script irgendwie die Daten nicht eingetragen werden, zwar landen die Fotos im angegebenem Ordner, doch sonst wird nix eingetragen, auch in der DB ist nichts...ich hoffe ihr könnt mir helfen..habe schon einige male alles durchgeschaut und ausprobiert, doch ich komm auf keine Lösung...

band.php
php:
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:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
<?php
include("config.inc.php");
$verbindung=mysql_connect($dbhost,$dbuser,$dbpasswd);

$id=$_GET['id'];
$bild=$_GET['bild'];

echo"
<table border=0 cellpadding=1 cellspacing=1 width='600' align='center'>
 <tr>
  <td colspan='3'>
    <a href='band_liste.php?abc=A'>A</a>
    <a href='band_liste.php?abc=B'>B</a>
    <a href='band_liste.php?abc=C'>C</a>
    <a href='band_liste.php?abc=D'>D</a>
    <a href='band_liste.php?abc=E'>E</a>
    <a href='band_liste.php?abc=F'>F</a>
    <a href='band_liste.php?abc=G'>G</a>
    <a href='band_liste.php?abc=H'>H</a>
    <a href='band_liste.php?abc=I'>I</a>
    <a href='band_liste.php?abc=J'>J</a>
    <a href='band_liste.php?abc=K'>K</a>
    <a href='band_liste.php?abc=L'>L</a>
    <a href='band_liste.php?abc=M'>M</a>
    <a href='band_liste.php?abc=N'>N</a>
    <a href='band_liste.php?abc=O'>O</a>
    <a href='band_liste.php?abc=P'>P</a>
    <a href='band_liste.php?abc=Q'>Q</a>
    <a href='band_liste.php?abc=R'>R</a>
    <a href='band_liste.php?abc=S'>S</a>
    <a href='band_liste.php?abc=T'>T</a>
    <a href='band_liste.php?abc=U'>U</a>
    <a href='band_liste.php?abc=V'>V</a>
    <a href='band_liste.php?abc=W'>W</a>
    <a href='band_liste.php?abc=X'>X</a>
    <a href='band_liste.php?abc=Y'>Y</a>
    <a href='band_liste.php?abc=Z'>Z</a>
  </td>
 </tr>";

$abfrage "SELECT * FROM band WHERE id='$id'";
$ergebnis=mysql_db_query($db,$abfrage,$verbindung);
while($row mysql_fetch_object($ergebnis))
    {
    if($bild=="1"){$bild=$row->bild1;}
    if($bild=="2"){$bild=$row->bild2;}
    if($bild=="3"){$bild=$row->bild3;}
    if($bild=="4"){$bild=$row->bild4;}
    if($bild=="5"){$bild=$row->bild5;}

    echo"
 <tr><td colspan='3'><b>$row->bandname</b> hochgeladen von $row->user</td></tr>
 <tr>
  <td valign='top' rowspan='3' width='200'>";

  if($bild==""){echo"";}else{echo"<a href='$bild' target='_blank'><img src='$bild' height='200' border='0'></a>";}
  echo"<br><br>";
  if($row->bild1!=""){echo"<a href='band.php?id=$id&bild=1'><img src='bilderlexikon/$row->bild1' height='100' border='0'></a> ";}else{echo"";}
  if($row->bild2!=""){echo"<a href='band.php?id=$id&bild=2'><img src='bilderlexikon/$row->bild2' height='100' border='0'></a> ";}else{echo"";}
  if($row->bild3!=""){echo"<a href='band.php?id=$id&bild=3'><img src='bilderlexikon/$row->bild3' height='100' border='0'></a> ";}else{echo"";}
  if($row->bild4!=""){echo"<a href='band.php?id=$id&bild=4'><img src='bilderlexikon/$row->bild4' height='100' border='0'></a> ";}else{echo"";}
  if($row->bild5!=""){echo"<a href='band.php?id=$id&bild=5'><img src='bilderlexikon/$row->bild5' height='100' border='0'></a> ";}else{echo"";}

  echo"</td>
  <td valign='top' width='100'><b>Band:</b></td>
  <td valign='top' width='300'>$row->bandname</td>
 </tr>
 <tr>
  <td valign='top'><b>Bandmitglieder:</b></td>
  <td valign='top'>$row->mitglied</td>
 </tr>
 <tr>
  <td valign='top'><b>Land:</b></td>
  <td valign='top'>$row->land</td>
 </tr>
 <tr>
  <td valign='top'><b>Biografie:</b></td>
  <td valign='top' colspan='2'>$row->land</td>
 </tr>
 <tr>
  <td valign='top'><b>Discografie:</b></td>
  <td valign='top' colspan='2'>$row->land</td>
 </tr>";
    }
echo"</table>";

?>


band_liste.php
php:
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:
<?php
include_once("config.inc.php");
$verbindung=mysql_connect($dbhost,$dbuser,$dbpasswd);

$abc=$_GET['abc'];

echo"
<table border=0 cellpadding=1 cellspacing=1 width='100%' align='center'>
 <tr>
  <td colspan='2'>
    <a href='band_liste.php?abc=A'>A</a>
    <a href='band_liste.php?abc=B'>B</a>
    <a href='band_liste.php?abc=C'>C</a>
    <a href='band_liste.php?abc=D'>D</a>
    <a href='band_liste.php?abc=E'>E</a>
    <a href='band_liste.php?abc=F'>F</a>
    <a href='band_liste.php?abc=G'>G</a>
    <a href='band_liste.php?abc=H'>H</a>
    <a href='band_liste.php?abc=I'>I</a>
    <a href='band_liste.php?abc=J'>J</a>
    <a href='band_liste.php?abc=K'>K</a>
    <a href='band_liste.php?abc=L'>L</a>
    <a href='band_liste.php?abc=M'>M</a>
    <a href='band_liste.php?abc=N'>N</a>
    <a href='band_liste.php?abc=O'>O</a>
    <a href='band_liste.php?abc=P'>P</a>
    <a href='band_liste.php?abc=Q'>Q</a>
    <a href='band_liste.php?abc=R'>R</a>
    <a href='band_liste.php?abc=S'>S</a>
    <a href='band_liste.php?abc=T'>T</a>
    <a href='band_liste.php?abc=U'>U</a>
    <a href='band_liste.php?abc=V'>V</a>
    <a href='band_liste.php?abc=W'>W</a>
    <a href='band_liste.php?abc=X'>X</a>
    <a href='band_liste.php?abc=Y'>Y</a>
    <a href='band_liste.php?abc=Z'>Z</a>
  </td>
 </tr>
 <tr>
  <td><b>Bandname</b></td>
  <td><b>Land</b></td>
 </tr>
 <tr>
  <td colspan='2'>Band Verzeichnis</td>
 </tr>";

$abfrage "SELECT * FROM band WHERE bandname LIKE '$abc%' ORDER BY bandname, land ASC";
$ergebnis=mysql_db_query($db,$abfrage,$verbindung);
while($row mysql_fetch_object($ergebnis))
    {

    echo"
 <tr>
  <td><a href='band.php?id=$row->id'>$row->bandname</a></td>
  <td>$row->land</td>
 </tr>";
    }
echo"</table>";

?>


band_neu.php
php:
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:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
<?php
$ja=$_POST['ja'];
$bandname=$_POST['bandname'];
$mitglieder=$_POST['mitglieder'];
$land=$_POST['land'];
$biografie=$_POST['biografie'];
$discografie=$_POST['discografie'];

include_once("config.inc.php");
$verbindung=mysql_connect($dbhost,$dbuser,$dbpasswd);

if($ja!="ja" OR $bandname==""){

echo"
<table style='width: 100%;' border='0'>
 <form action='band_neu.php' method='post' enctype='multipart/form-data'>
 <tr>
  <td colspan='3' class='tab_untertitel' width='100%'>Neue Band anlegen</td>
 </tr>
 $problem
 <tr>
  <td valign='top'><b>* Bandname</b></td>
  <td valign='top'><input type='text' name='bandname' value='$bandname'></td>
  <td class='tab_text_klein'></td>
 </tr>
 <tr>
  <td valign='top'><b>Mitglieder</b></td>
  <td valign='top'><input type='text' name='mitglieder' value='$mitglieder'></td>
  <td></td>
 </tr>
 <tr>
  <td valign='top'><b>Land</b></td>
  <td valign='top'><input type='text' name='land' value='$land'></td>
 </tr>
 <tr>
  <td valign='top'><b>Biografie</b></td>
  <td valign='top' colspan='2'><textarea name='biografie' style='width:90%; height:100px;'>$biografie</textarea></td>
 </tr>
 <tr>
  <td valign='top'><b>Discografie</b></td>
  <td valign='top' colspan='2'><textarea name='discografie' style='width:90%; height:100px;'>$discografie</textarea></td>
 </tr>
 <tr>
  <td></td>
  <td colspan=2><input type='file' name='Datei1' accept='image/*'></td>
 </tr>
 <tr>
  <td></td>
  <td colspan=2><input type='file' name='Datei2' accept='image/*'></td>
 </tr>
 <tr>
  <td></td>
  <td colspan=2><input type='file' name='Datei3' accept='image/*'></td>
 </tr>
 <tr>
  <td></td>
  <td colspan=2><input type='file' name='Datei4' accept='image/*'></td>
 </tr>
 <tr>
  <td></td>
  <td colspan=2><input type='file' name='Datei5' accept='image/*'></td>
 </tr>
 <tr><td colspan=3>&nbsp;</td></tr>
 <tr>
  <td colspan='2' align='right'><input type='hidden' name='ja' value='ja'><input type='reset' value='Felder leeren'> <input type='submit' value='Band anlegen'></form></td>
  </tr>
 <tr><td colspan=3>&nbsp;</td></tr>
</table>";

}else{

$abfrage_name "SELECT * FROM band WHERE bandname='$bandname'";
$abfrage2_name=mysql_db_query($db,$abfrage_name,$verbindung);
$abfrage_name_zahl mysql_num_rows($abfrage2_name);
if($abfrage_name_zahl=="0"){

$time=time();

$bild_name="$bandname-$time";
$bild_name str_replace(" ","_",$bild_name);$bild_name str_replace("ä","a",$bild_name);$bild_name str_replace("ö","o",$bild_name);$bild_name str_replace("Ö","O",$bild_name);$bild_name str_replace("ü","u",$bild_name);$bild_name str_replace("é","e",$bild_name);$bild_name str_replace("è","e",$bild_name);$bild_name str_replace("ß","ss",$bild_name);

$bild1 "$bild_name-1.jpg";
$bild1htmlentities($bild1ENT_QUOTES);
$datei1=$_FILES['Datei1']['tmp_name'];
$move1=move_uploaded_file($_FILES['Datei1']['tmp_name'], "bilderlexikon/".$bild1);

$bild2 "$bild_name-2.jpg";
$bild2htmlentities($bild2ENT_QUOTES);
$datei2=$_FILES['Datei2']['tmp_name'];
$move2=move_uploaded_file($_FILES['Datei2']['tmp_name'], "bilderlexikon/".$bild2);

$bild3 "$bild_name-3.jpg";
$bild3htmlentities($bild3ENT_QUOTES);
$datei3=$_FILES['Datei3']['tmp_name'];
$move3=move_uploaded_file($_FILES['Datei3']['tmp_name'], "bilderlexikon/".$bild3);

$bild4 "$bild_name-4.jpg";
$bild4htmlentities($bild4ENT_QUOTES);
$datei4=$_FILES['Datei4']['tmp_name'];
$move4=move_uploaded_file($_FILES['Datei4']['tmp_name'], "bilderlexikon/".$bild4);

$bild5 "$bild_name-5.jpg";
$bild5htmlentities($bild5ENT_QUOTES);
$datei5=$_FILES['Datei5']['tmp_name'];
$move5=move_uploaded_file($_FILES['Datei5']['tmp_name'], "bilderlexikon/".$bild5);

$eintrag "INSERT INTO band (
`bandname` ,
`mitglied` ,
`land` ,
`biografie` ,
`discografie` ,
`bild1` ,
`bild2` ,
`bild3` ,
`bild4` ,
`bild5`  ,
`user`
) VALUES ('$bandname', '$mitglied', '$land', '$biografie', '$discografie', '$bild1', '$bild2', '$bild3', '$bild4', '$bild5', '$user')";
$eintragen mysql_db_query($db,$eintrag,$verbindung);

}else{echo"Bandname schon vorhanden";}

}
?>


__________________
Dieser Beitrag gehörte zu einer Löschaktion von Beiträgen eines Users, er wurde diesem User überschrieben, damit der Thread nicht an Sinn verliert.
28.06.2009 14:39 Startpost-Retter ist offline Beiträge von Startpost-Retter suchen Nehmen Sie Startpost-Retter in Ihre Freundesliste auf
Baumstruktur | Brettstruktur
Gehe zu:
Gegen Bilderklau - Das Original » Design, Website, Copyright » Homepagehilfe » Homepagehilfe - Archiv » [PHP & MySQL] Daten werden nicht eingetragen

Impressum

Forensoftware: Burning Board, entwickelt von WoltLab GmbH