Php 2 Html

Dieses Thema im Forum "Webentwicklung" wurde erstellt von scorpiopsychocat, 14. April 2005 .

Schlagworte:
Status des Themas:
Es sind keine weiteren Antworten möglich.
  1. 14. April 2005
    Also ich habe ein Join/fight-us Script für meine Clanpage. Nur is meine Clanseite komplett in html und das script in php. Könnte mir jemand sagen wie man das in html umwandelt. ich schreib mal den code hin:

    Config:
    PHP:
    <?

    // Mail an die das Formular gesendet wird
    $to_email  "admin@deine-hp.de" ;
    // Dein Clan Tag
    $clantag  "[CS]" ;
    // Der Text der Über dem Fight us Formular steht
    $fighttxt  "Wenn du unseren Clan figten willst kannst du uns mit diesem Formular eine E-Mail senden." ;
    // Der Text der Über dem Join us Formular steht
    $jointxt  "Wenn du unseren Clan joinen willst kannst du uns mit diesem Formular eine E-Mail senden." ;

    $color1  "#2D3851" // Background Farbe
    $color2  "#4F5F6C" // TD Farbe

    $textcolor  "#CCCCCC" // Text Farbe
    $linkcolor  "#FF9900" // Link, Visited, Hover link Farbe


    ?>
    Fight us:
    PHP:
    <?  ob_start ();
    include(
    "config.php" );

    echo 
    '<html>
          <title>Clandatenbank Script</title>
          <head>'
    ;

     echo 
    '<style type="text/css">
           TD        {FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; FONT-SIZE: 11px; color: '
    . $textcolor . '}
           A:link        { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-style: normal; line-height: normal; color: '
    . $linkcolor . '; text-align: center; }
           A:visited    { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-style: normal; line-height: normal; color: '
    . $linkcolor . '; text-align: center; }
           A:hover        { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-style: normal; line-height: normal; color: '
    . $linkcolor . '; text-align: center; }
           A:active    { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-style: normal; line-height: normal; color: '
    . $linkcolor . '; text-align: center; }
          </style>
          <style type="text/css">
           INPUT {
             font-size: 10px;
             color: #000000;
             background-color: '
    . $color2 . ';
             border: 1px solid #000000;
           }
    </style>
    </head>

    <body bgcolor="'
    . $color1 . '" text="' . $textcolor . '">' ;

    switch(
    $goto ) {
      default:
    echo 
    '<center>
    <table border="0" width="100%" height="100%" cellspacing="0" cellpadding="0">
    <tr>
    <td vAlign="top"><center>'
    . $fighttxt . '</center><br><br>

    <center><table border="0" width="200" height="200" cellspacing="0" cellpadding="4">
        <tr>
        <td>Clan:</td>
        <td><form action="'
    . $PHP_SELF . '?goto=fightus" method="post">
        <input type="text" name="clan" size="16">'
    ;
          if(
    $pclan == "no" ){ echo  ' <font color="red">Fail</font>' ; }
          echo 
    '</td>
        </tr>
        <tr>
        <td>Homepage:</td>
        <td><input type="text" name="homepage" size="16">'
    ;
          if(
    $phomepage == "no" ){ echo  ' <font color="red">Fail</font>' ; }
          echo 
    '</td>
        </tr>
        <tr>
        <td>XonX:</td>
        <td><input type="text" name="xonx" size="16">'
    ;
          if(
    $pxonx == "no" ){ echo  ' <font color="red">Fail</font>' ; }
          echo 
    '</td>
        </tr>
        <tr>
        <td>Map:</td>
        <td><select name="map" size="1" style="BACKGROUND: '
    . $color2 . '; FONT-FAMILY: verdana; FONT-SIZE: 10px" style="border: 1px solid #000000";>
       <option selected>-</option>
       <option>de_dust</option>
       <option>de_aztec</option>
       <option>de_dust2</option>
       <option>cs_italy</option>
       <option>de_inferno</option>
       <option>de_prodigy</option>
       <option>cs_assault</option>
       <option>cs_office</option>
       <option>cs_militia</option>
       <option>de_train</option>
       <option>de_survivor</option>
       <option>de_storm</option>
       <option>de_torn</option>
       <option>cs_militia</option>
       <option>de_vertigo</option>
       <option>cs_siege</option>
       <option>de_cbble</option>
       <option>de_vegas</option>
       <option>de_nuke</option>
       <option>de_torn</option>
       <option>cs_747</option>
       <option>cs_backalley</option>
       </select></font></td>
       </tr>
       <tr>
        <td>Match type:</td>
        <td><input type="text" name="match" size="16">'
    ;
          if(
    $pmatch == "no" ){ echo  ' <font color="red">Fail</font>' ; }
          echo 
    '</td>
        </tr>
        <tr>
        <td>Datum:</td>
        <td><input type="text" name="datum" size="16">'
    ;
          if(
    $pdatum == "no" ){ echo  ' <font color="red">Fail</font>' ; }
          echo 
    '</td>
        </tr>
        <tr>
        <td>Zeit:</td>
        <td><input type="text" name="zeit" size="16">'
    ;
          if(
    $pzeit == "no" ){ echo  ' <font color="red">Fail</font>' ; }
          echo 
    '</td>
        </tr>
        <tr>
        <td>Kontakt:</td>
        <td><input type="text" name="contact" size="16">'
    ;
          if(
    $pcontact == "no" ){ echo  ' <font color="red">Fail</font>' ; }
          echo 
    '</td>
        </tr>
        <tr>
        <td>ICQ:</td>
        <td><input type="text" name="icq" size="16">'
    ;
          if(
    $picq == "no" ){ echo  ' <font color="red">Fail</font>' ; }
          echo 
    '</td>
        </tr>
        <tr>
        <td>&nbsp;</td>
        <td><input type="submit" value="Submit"> <input type="reset" value="Reset"></form></td>
        </tr>
        </table>
    </center></td>
    </tr>
    </table>
    </center>'
    ;
    break;

    case 
    "fightus" :
    if(
    trim ( $clan )!= ""  &&  trim ( $homepage )!= ""  &&  trim ( $xonx )!= ""  &&  trim ( $match )!= ""  &&  trim ( $datum )!= ""  &&  trim ( $zeit )!= ""  &&  trim ( $contact )!= ""  &&  trim ( $icq )!= "" ){

    $message = "Es will jemand  $clantag  fighten. \n
    Seine angaben: \n \n
    Nick: 
    $clan  \n
    Homepage: 
    $homepage  \n
    XonX: 
    $xonx  \n
    Map: 
    $map  \n
    Match type: 
    $match  \n
    Datum: 
    $datum  \n
    Zeit: 
    $zeit  \n
    Email: 
    $contact  \n 
    ICQ: 
    $icq  \n \n
    Er bittet um Rückmeldung!"

    $subject = " $clan  vs  $clantag  fight!"
    mail ( $to_email , $subject , $message , "From:  $contact " );

    echo 
    '<center>
    <table border="0" width="100%" height="100%" cellspacing="0" cellpadding="0">
    <tr>
    <td vAlign="top"><center><table border="0">
    <tr>
    <td>Deine Email wurde erfolgreich versand!</td>
    </tr>
    </table></center>
    </td>
    </tr>
    </table></center>'
    ;

    }
        else {
            if(
    trim ( $clan )== "" ){  $error  "&pclan=no" ; }
            if(
    trim ( $homepage )== "" ){  $error  .=  "&phomepage=no" ; }
            if(
    trim ( $xonx )== "" ){  $error  .=  "&pxonx=no" ; }
            if(
    trim ( $match )== "" ){  $error  .=  "&pmatch=no" ; }
            if(
    trim ( $datum )== "" ){  $error  .=  "&pdatum=no" ; }
            if(
    trim ( $zeit )== "" ){  $error  .=  "&pzeit=no" ; }
            if(
    trim ( $contact )== "" ){  $error  .=  "&pcontact=no" ; }
            if(
    trim ( $icq )== "" ){  $error  .=  "&picq=no" ; }
            
    header ( "Location: " . $PHP_SELF . "?goto=default" . $error );
            
        }
    breaK;
    }

    ?>
    Join us:
    PHP:
    <?  ob_start ();
    include(
    "config.php" );

    echo 
    '<html>
          <title>Clandatenbank Script</title>
          <head>'
    ;

     echo 
    '<style type="text/css">
           TD        {FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; FONT-SIZE: 11px; color: '
    . $textcolor . '}
           A:link        { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-style: normal; line-height: normal; color: '
    . $linkcolor . '; text-align: center; }
           A:visited    { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-style: normal; line-height: normal; color: '
    . $linkcolor . '; text-align: center; }
           A:hover        { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-style: normal; line-height: normal; color: '
    . $linkcolor . '; text-align: center; }
           A:active    { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-style: normal; line-height: normal; color: '
    . $linkcolor . '; text-align: center; }
          </style>
          <style type="text/css">
           INPUT {
             font-size: 10px;
             color: #000000;
             background-color: '
    . $color2 . ';
             border: 1px solid #000000;
           }
    </style>
    </head>

    <body bgcolor="'
    . $color1 . '" text="' . $textcolor . '">' ;

    switch(
    $goto ) {
      default:
    echo 
    '<center>
    <table border="0" width="100%" height="100%" cellspacing="0" cellpadding="0">
    <tr>
    <td vAlign="top"><center>'
    . $jointxt . '</center><br><br>

    <center><table border="0" width="200" height="200" cellspacing="0" cellpadding="4">
        <tr>
        <td>Name:</td>
        <td><form action="'
    . $PHP_SELF . '?goto=joinus" method="post">
        <input type="text" name="nick" size="16">'
    ;
          if(
    $pnick == "no" ){ echo  ' <font color="red">Fail</font>' ; }
          echo 
    '</td>
        </tr>
        <tr>
        <td>Alter:</td>
        <td><input type="text" name="alter" size="16">'
    ;
          if(
    $palter == "no" ){ echo  ' <font color="red">Fail</font>' ; }
          echo 
    '</td>
        </tr>
        <tr>
        <td>Connection:</td>
        <td><input type="text" name="connection" size="16">'
    ;
          if(
    $pconnection == "no" ){ echo  ' <font color="red">Fail</font>' ; }
          echo 
    '</td>
        </tr>
        <tr>
        <td>Herkunft:</td>
        <td><input type="text" name="herkunft" size="16">'
    ;
          if(
    $pherkunft == "no" ){ echo  ' <font color="red">Fail</font>' ; }
          echo 
    '</td>
        </tr>
        <tr>
        <td>E-mail:</td>
        <td><input type="text" name="email" size="16">'
    ;
          if(
    $pemail == "no" ){ echo  ' <font color="red">Fail</font>' ; }
          echo 
    '</td>
        </tr>
        <tr>
        <td>ICQ:</td>
        <td><input type="text" name="icq" size="16">'
    ;
          if(
    $picq == "no" ){ echo  ' <font color="red">Fail</font>' ; }
          echo 
    '</td>
        </tr>
        <tr>
        <td>&nbsp;</td>
        <td><input type="submit" value="Submit"> <input type="reset" value="Reset"></form></td>
        </tr>
        </table>
    </center></td>
    </tr>
    </table>
    </center>'
    ;
    break;

    case 
    "joinus" :
    if(
    trim ( $nick )!= ""  &&  trim ( $alter )!= ""  &&  trim ( $connection )!= ""  &&  trim ( $herkunft )!= ""  &&  trim ( $email )!= ""  &&  trim ( $icq )!= "" ){

    $message = "Es will jemand  $clantag  joinen. \n
    Seine angaben: \n \n
    Nick: 
    $nick  \n
    Alter: 
    $alter  \n
    Connection: 
    $connection  \n
    Herkunft: 
    $herkunft  \n
    E-Mail: 
    $email  \n 
    ICQ: 
    $icq  \n \n
    Er bittet um Rückmeldung!"

    $subject = "Ich möchte jemand  $clantag  joinen |  $nick "
    mail ( $to_email , $subject , $message , "From:  $email " );

    echo 
    '<center>
    <table border="0" width="100%" height="100%" cellspacing="0" cellpadding="0">
    <tr>
    <td vAlign="top"><center><table border="0">
    <tr>
    <td>Deine Email wurde erfolgreich versand!</td>
    </tr>
    </table></center>
    </td>
    </tr>
    </table></center>'
    ;

    }
        else {
            if(
    trim ( $nick )== "" ){  $error  "&pnick=no" ; }
            if(
    trim ( $alter )== "" ){  $error  .=  "&palter=no" ; }
            if(
    trim ( $connection )== "" ){  $error  .=  "&pconnection=no" ; }
            if(
    trim ( $herkunft )== "" ){  $error  .=  "&pherkunft=no" ; }
            if(
    trim ( $email )== "" ){  $error  .=  "&pemail=no" ; }
            if(
    trim ( $icq )== "" ){  $error  .=  "&picq=no" ; }
            
    header ( "Location: " . $PHP_SELF . "?goto=default" . $error );
            }
        breaK;
    }

    ?>


    IM DATEIANHANG SIND DIE DATEIEN AUCH DRIN!!!
     
  2. 14. April 2005
    Garnicht. Wenn sowas mit html zu relaisieren wäre, dann würds ja wohl kein php geben. Also entweder du musst verzichten oder du suchst dir webspace der PHP unterstüzt.

    MfG derflooh
     
  3. 14. April 2005
    richtig entweder du machst es mit html mit einem formular das wenn man auf abschicken klickt ein outlook fenterst mit allen daten drinn sind die eingegeben wurden oder php aber die erste methode ist sowas fürn ar*ch da will keiner dich joinen ^^

    php und mysql sind halt die websprachen der zukunft

    mit denen ist fast alles realisierbar
     
  4. 14. April 2005
    hast du php speicher?wenn ja einfach die dateien in fight.php umwandeln.. einfach html durch php ersetztn ^^
     
  5. 14. April 2005
    soweit ich es verstanden habe hat er ja kein php space

    weil alles auf html basiert aber man könnte free space ohost.de oder so nehmen und dann die datei einfach mit frames einbringen so hab ich es gemacht bei einer seite wo ich nicht extra für eine php datei php space für 4€ mehr kaufen wollte
     
  6. 14. April 2005
    also kann mir jemand erklären wies funzt
     
  7. 14. April 2005
    was funzt ? in html umändern ?
     
  8. 15. April 2005
    ich glaube er meint die Frames, ich habe dazu nicht die Zeit. Steht aber auch im jeden HTML Buch...
     
  9. 16. April 2005
    Schau mal hier nach:

    SELFHTML 8.1.2 (HTML-Dateien selbst erstellen)

    MfG derflooh
     
  10. 16. April 2005
    am einfachsten via iframe vom freespace die php datei hohlen
    z.b.
    PHP:
    < IFRAME src = "path zur phpdatei.php"  width = "200"  heigh = "360"  frameborder = "0"  >
     
  11. 17. April 2005
    Include doch es einfach.
     
  12. 17. April 2005

    rofl hast du alles gelesen ?
    wenn er schon die PHP DATEIEN nicht auf sein server kann dann kann er auch nicht includen weil fürs includen braucht man php ne ?

    <?PHP include(''); PHP?>

    also geht das nicht
     
  13. 17. April 2005
    mist stimmt da hab ich kurz nicht mitgedacht
    mal abgesehen davon unterstütz schon fast jeder free webspace hoster php und mysql.
     
  14. 17. April 2005
    jo das schon aber wenn er eine .de oder was sonst domain hat und nur html space bestellt hat ist das schlecht ^^ ich würde mir dann halt space bei ohost o.a hohlen und das ganze mim iframe einbinden
     
  15. Video Script

    Videos zum Themenbereich

    * gefundene Videos auf YouTube, anhand der Überschrift.