[PHP & MySQL] Training. | Neues Problem.

Mari
Bitte mal in den Post vom 11.06.09 schauen fröhlich


Habe mich ans Klicktraining gewagt.. Im Code scheint ein Fehler zu sein, ich find ihn einfach nicht. Wäre nett wenn mal jemand drüberschauen würde...

code:
1:
Parse error: syntax error, unexpected T_VARIABLE in /usr/export/www/vhosts/funnetwork/hosting/rvlontano/RV/Pferde/dressur_victor.php on line 34


Code:
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:

<?php
    session_start();
    if(isset($_SESSION["login"])) { // Wenn eingeloggt..
        include("header.php");
        include("db.php");
        include("functions.inc.php");
        refresh($_SESSION["login"]); // refresht
        
        }
        ?>

<html>
<head>
<style>
body { font-size:11px; font-family:Verdana; color:#000000; scrollbar-face-color:ffef83; scrollbar-highlight-color:ffef83; scrollbar-3dlight-color:ffef83; scrollbar-darkshadow-color:ffdf00; scrollbar-shadow-color:ffef83; scrollbar-arrow-color:ffdf00; scrollbar-track-color:ffef83;}
a:link { color:#000000; text-decoration:none; font-weight:standart; }
a:visited { color:#000000; text-decoration:none; font-weight:standart; }
a:hover { color:#000000; text-decoration:none; font-weight:standart; filter:dropshadow(color=#ffffff,offX=1,offY=1); height:7pt }
a:active {color:#000000; text-decoration:none; font-weight:standart; }
table { border-collapse: collapse; border-style: dotted; border-color: #ffdf00; border-width: 2px; font-family: verdana; font-size: 11px; }
textarea { font-size: 9pt; font-family: Verdana; color:#000000; border: 1px dotted #ffdf00; background: #e2e2e2; }
</style>
<title>RV Lontano</title>
</head>
<body>
<?php
            $abfrage "SELECT * FROM pferde WHERE name = 'Victor'";
            $ergebnis mysql_query($abfrage);
            while($row mysql_fetch_object($ergebnis))
            { 
            
$summe '$row->drjetzt' '2'
                
$aendern =("UPDATE pferde Set drjetzt = '$summe' WHERE name = 'Victor'");
$update mysql_query($aendern);

      if($update==true) {
         echo "<b>Sehr gut!</b>
         Du hast Victor im Dressurreiten trainiert und er hat in dieser Disziplin 2 Punkte gutgeschrieben bekommen!";
      } else {
         echo "Fehler!";
         include('pferde.php');
      }

}
?>

</body>

</html>




Danke schonmal fröhlich
PLUSQUAMPERFEKT
Du hast in Zeile 32

$summe = '$row->drjetzt' + '2'

das ; vergessen... Augenzwinkern
Mari
omg. das is so typisch ich.. -.-''

Danke dir!
PLUSQUAMPERFEKT
smile Ich bin nicht anders smile
Mari
So. An sich funktioniert es.. zumindest beim ersten Mal. Sobald der Wert 2 gesetzt ist lässt es sich nicht mehr steigern, sagt zwar es täte das, aber der Wert in der DB ändert sich nicht -.-
Wäre nett wenn mal jemand drüber schauen könnte woran das liegen könnte..

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:

<?php
    session_start();
    if(isset($_SESSION["login"])) { // Wenn eingeloggt..
        include("header.php");
        include("db.php");
        include("functions.inc.php");
        refresh($_SESSION["login"]); // refresht
        
        }
        ?>

<html>
<head>
<style>
body { font-size:11px; font-family:Verdana; color:#000000; scrollbar-face-color:ffef83; scrollbar-highlight-color:ffef83; scrollbar-3dlight-color:ffef83; scrollbar-darkshadow-color:ffdf00; scrollbar-shadow-color:ffef83; scrollbar-arrow-color:ffdf00; scrollbar-track-color:ffef83;}
a:link { color:#000000; text-decoration:none; font-weight:standart; }
a:visited { color:#000000; text-decoration:none; font-weight:standart; }
a:hover { color:#000000; text-decoration:none; font-weight:standart; filter:dropshadow(color=#ffffff,offX=1,offY=1); height:7pt }
a:active {color:#000000; text-decoration:none; font-weight:standart; }
table { border-collapse: collapse; border-style: dotted; border-color: #ffdf00; border-width: 2px; font-family: verdana; font-size: 11px; }
textarea { font-size: 9pt; font-family: Verdana; color:#000000; border: 1px dotted #ffdf00; background: #e2e2e2; }
</style>
<title>RV Lontano</title>
</head>
<body>
<?php
            $abfrage "SELECT * FROM pferde WHERE name = 'Victor'";
            $ergebnis mysql_query($abfrage);
            while($row mysql_fetch_object($ergebnis))
            { 
            
$summe '$row->drjetzt' '2';
                
$aendern = ("UPDATE pferde Set drjetzt='$summe' WHERE name='Victor'");
$update mysql_query($aendern);

      if($update==true) {
         echo "<b>Sehr gut!</b><br />
         Du hast Victor im Dressurreiten trainiert und er hat in dieser Disziplin 2 Punkte gutgeschrieben bekommen!";
      } else {
         echo "Fehler!";
         include('pferde.php');
      }

}
?>

</body>

</html>
Mari
Vielen Dank fröhlich
Es funktioniert einwandfrei.