linkliste coden

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • linkliste coden

    ich hab jetzt mal angefangen eine linkliste zu coden! und ich will da verschieden rubriken haben also mach ich das so:
    eintragen.php
    PHP Code:
    <?
      if($in == "Homepage")
        {
        echo "du bist in hp";
        }
      else
        {
        if($in == "Internet")
          {
          echo "du bist in internet";
          }
        else
          {
          if($in == "Schule")
    {
    echo "du bist in schule";
    }
    else
    {
    if($in == "Musik")
    {
    echo "du bist in musik";
          }
    else
    {
    if ($in == "Literatur")
    {
    echo "du bist in literatur";
    }
    else 
    {
    if($in == "Sport")
    {
    echo "du bist in sport";
    }
    else 
    {
    if($in == "Natur")
    {
    echo "du bist in natur";
    }
    else
    {
    if($in == "anderes")
    {
    echo "du bist in anderes";
    }
    else
    {
    echo "du bist dumm";

      ?>
    nur wenn ich das hochlade kommt das:
    Code:
    Parse error: syntax error, unexpected $end in /usr/export/www/vhosts/funnetwork/hosting/fabianpfeiffer/linkliste/eintragen.php on line 52
    was soll ich da machen!

    das formular schaut so aus:
    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <
    html>
    <
    head>
      <
    meta content="text/html; charset=ISO-8859-1"
     
    http-equiv="content-type">
      <
    title>eintragen</title>
    </
    head>
    <
    body style="color: rgb(0, 0, 0); background-color: rgb(0, 0, 0);"
     
    link="#000099" alink="#000099" vlink="#990099">
    <
    form method="post" action="eintragen.php" name="eintragen">
      <
    center>
      <
    p
     style
    ="border-style: dashed; border-color: rgb(255, 255, 255); width: 440px; background-color: rgb(102, 102, 102);"><br>
      <
    table
     style
    ="margin-left: auto; margin-right: auto; text-align: left; width: 430px; height: 229px;"
     
    border="0" cellpadding="2" cellspacing="2">
        <
    tbody>
          <
    tr>
            <
    td style="width: 192px;"><font color="#ffffff">Name:*</font><br>
            <
    input name="name"><br>
            </
    td>
            <
    td style="width: 741px;"><font color="#ffffff">E-Mail:*</font>
            <
    br>
            <
    input name="email"><br>
            </
    td>
          </
    tr>
          <
    tr>
            <
    td style="width: 192px;"><font color="#ffffff">Url*:</font> <input
     name
    ="hp" value="http://"> <br>
            </
    td>
            <
    td style="width: 741px;"><font color="#ffffff">In:</font>&nbsp;&nbsp;&nbsp;
            <
    br>
            <
    select name="in">
            <
    option>Homepage</option>
            <
    option selected="selected">Internet</option>
            <
    option>Schule</option>
            <
    option>Musik</option>
            <
    option>Literatur</option>
            <
    option>Sport</option>
            <
    option>Natur</option>
            <
    option>anderes</option>
            </
    select>
            <
    br>
            </
    td>
          </
    tr>
          <
    tr>
            <
    td colspan="2" rowspan="1"><font color="#ffffff">Beschreibung:*
            <
    font size="-1">(max.200
    Zeichen
    )</font> <br>
            <
    textarea cols="50" rows="5" name="text" maxlength="240"></textarea><br>
            </
    font></td>
          </
    tr>
        </
    tbody>
      </
    table>
      </
    p>
      <
    input value="eintragen" type="submit">&nbsp;&nbsp;&nbsp; <input
     type
    ="reset"><br>
      </
    center>
    </
    form>
    </
    body>
    </
    html
    was soll ich da machen
    Fabian Pfeiffer
    fabianpfeiffer@gmx.at
    www.fabian-pfeiffer.at.tt

  • #2
    Hallo

    Hallo

    Laut deiner Fehlermeldung hast du die IF anweisungen falsch verschachtelt

    Du solltest dir mal gedanken zu deiner Programmierweise machen so viele verschachtelte If anweisungen sind nicht gerade zu empfehelen benutz lieber eine switch anweisung ist übersichtlicher und solche
    Fehler lassen sich damit auch vermeiden.
    Ich hoffe es hilft

    Comment


    • #3
      aha nur wie funktioniert eine switch anweisung
      Fabian Pfeiffer
      fabianpfeiffer@gmx.at
      www.fabian-pfeiffer.at.tt

      Comment


      • #4
        kuckst du hier
        Ich hoffe es hilft

        Comment


        • #5
          vielen dank
          Fabian Pfeiffer
          fabianpfeiffer@gmx.at
          www.fabian-pfeiffer.at.tt

          Comment

          Working...
          X