Thomas Z.: php.ini register_globals = off

Beitrag lesen

so jetzt ja, musste mal eben Opa und Oma besuchen gehen, sind ins Krankenhaus gekommen.

hier mal das was erstmal aufgerufen wird und die kw etc auflisten

<pre align="center"><font face="Arial" size="3"><b>Jahr : </b><select name="jahr" size="1" background-color="#FFFFE0"><option>&nbsp;&nbsp;&nbsp;</option>
<option value="1992">1992</option>
<option value="1993">1993</option>
<option value="1994">1994</option>
</select><b> KW: </b><select name="kw" size="1" background-color="#FFFFE0">
</select> <b>Pl&aumltze: </b></select><select name="pos" size="1" background-color="#FFFFE0">
<option>&nbsp;&nbsp;&nbsp;</option>
<option value="10"SELECTED>10</option>
<option value="50">50</option>
<option value="100">100</option>
</select>&nbsp;&nbsp;<input type="submit" value="Go !"></font></center>^M
</div>^M
</form>^M
</html>

ausgabe.php

<?php

include("admin/zugang.inc.php");
switch ($jahr)

{
case "1992"    : $sql="SELECT * FROM top100, woche  WHERE top100.jahr='$jahr' AND woche.jahr='$jahr' AND top100.kw='$kw' and woche.kw='$kw' LIMIT 0,1";
           break;
case "1993"    : $sql="SELECT * FROM top100, woche  WHERE top100.jahr='$jahr' AND woche.jahr='$jahr' AND top100.kw='$kw' and woche.kw='$kw' LIMIT 0,1";
           break;
case "1994"    : $sql="SELECT * FROM top100, woche  WHERE top100.jahr='$jahr' AND woche.jahr='$jahr' AND top100.kw='$kw' and woche.kw='$kw' LIMIT 0,1";
           break;

default        : $sql="SELECT * FROM nodata";
           break;

}

$ergebnis = mysql_query($sql,$verbindung);

echo "<table width='471' border='1' bordercolor='#FF9900'  cellspacing='1'cellpadding='1' align='center'>";
echo "<tr bgcolor='#FFAC05'>";
echo "<td align='center'><font color='#000000'><FONT FACE='Arial' SIZE=2><b>Charts Fuer Die Woche Vom</td>";
echo "</tr>";
while ($row = mysql_fetch_object($ergebnis))

{
echo "<tr bgcolor='#000080'>
<td align='center'><font color='#FFFF00'><b>$row->datum</b></td>
</tr>";

}
echo "</table>";
echo "<p>";
mysql_free_result($ergebnis);

mysql_close($verbindung);
?>

<?php

ich hab dann mal ein echo auf $sql gesetzt

Ergebnis :

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 8

das aber nur bei register_globals = Off

0 52

php.ini register_globals = off

Thomas Z.
  • php
  1. 0
    wahsaga
  2. 0
    Joachim
  3. 0
    Vinzenz Mai
    1. -1
      Thomas Z.
      1. 0
        wahsaga
        1. 0
          Thomas Z.
        2. 0
          Thomas Z.
      2. 0
        Vinzenz Mai
        1. 0
          Thomas Z.
          1. 0
            Thomas Z.
            1. 0
              wahsaga
              1. 0
                Thomas Z.
                1. 0
                  fastix®
                  1. 0
                    Thomas Z.
                    1. 0
                      Vinzenz Mai
                      1. 0
                        Thomas Z.
                        1. 0
                          Rouven
                          1. 0
                            Thomas Z.
                            1. 0
                              Rouven
                              1. 0
                                Thomas Z.
                                1. 0
                                  Ashura
                                2. 0
                                  fastix®
                                  1. 0
                                    Thomas Z.
                                    1. 0
                                      fastix®
                                      1. 0
                                        Thomas Z.
                                        1. 0
                                          wahsaga
                    2. 0
                      fastix®
                      1. 0
                        Thomas Z.
                        1. 0
                          fastix®
                        2. 0
                          Vinzenz Mai
                          1. 0
                            Thomas Z.
                            1. 0
                              Vinzenz Mai
                              1. 0
                                Thomas Z.
                2. 0
                  wahsaga
                  1. -1
                    Thomas Z.
            2. 0
              Vinzenz Mai
            3. 0
              fastix®
          2. 0
            dedlfix
  4. 0
    fastix®
    1. 0
      fastix®
      1. 0
        Thomas Z.
        1. 0
          fastix®
          1. 0
            Tobias Kloth
            1. 0
              fastix®
    2. 0
      dedlfix
      1. 0
        fastix®
        1. 0
          Tobias Kloth
          1. 0
            fastix®
            1. 0
              Tobias Kloth
              1. 0
                fastix®
  5. 0
    Tom