Herzlich Willkommen, lieber Gast!
  Sie befinden sich hier:

  Forum » HTML / XML / XHTML » Gästebuch mit statischer verlinkung in einem Div öffnen

Forum | Hilfe | Team | Links | Impressum | > Suche < | Mitglieder | Registrieren | Einloggen
  Quicklinks: MSDN-Online || STL || clib Reference Grundlagen || Literatur || E-Books || Zubehör || > F.A.Q. < || Downloads   

Autor Thread - Seiten: > 1 <
000
14.06.2006, 12:29 Uhr
~Hallo
Gast


Hab unter der Suche nichts gefunden.

Ich habe eine Seite mit CSS gemacht. Nun möchte ich, dass ich nach betätigung des Links <href.. kein CMS o.ä. das Gästebuch gbuch.php in meinem Content-div öffnet. Und nicht einfach nur gbuch.php öffnet.
 
Profil || Private Message || Suche Download || Zitatantwort || Editieren || Löschen || IP
001
14.06.2006, 14:02 Uhr
~hallo
Gast


Ich halte es eigentlich für unnötig, aber hier mal mein Quelltext. Ich bin über feedback immer sehr dankbar. Wenn ihr vorschläge habt, was total mist ist(wird vieles sein) oder einfach wie man etwas "schöner" machen kann, dann sagt es mir bitte p.s. die seite hab ich nur schnell gemacht. Es ging mir eher ums gästebuch(beschäftige mich erst seit kurzem mit php und html und so nem kram).

Index.php:

PHP 4:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>
<head>
    <LINK rel="stylesheet" type="text/css" href="style.css" media="all">
    <title>title</title>
</head>
<body>
    
            <div id="left_col">
        
                <img id="logo" src="images/logolinks.png">  
                
                <div id="menu1">    
                    <a class="menu" href="||LC01||                    <a class="menu" href="||LC01||            
                </div>
                
                <div id="menu2">    
                    <a class="menu" href="||LC01||                    <a class="menu" href="||LC01||            
                </div>
                <div id="menu3" >    
                    <a class="menu" href="gbuch.php" target="content">GB</a>
                    <a class="menu" href="gbuch2.php">Kontakt</a>
                </div>
                <div id="abschluss"> <br></div>
            </div>
            
             <div id="right_col">
                        
                 <div id="teaser_images">
                    <img src="images/livetip.png">
                </div>
                
                <div id="main_headline">
                    <h1>Gästebuch</h1>
                </div>
                
                <div id="dotted_line"></div>
                
                <div id="content">
                
                    
                    <h1>GB-Test-Seite</h1>
                    <h2>Klicke Links auf den Link-Gästebuch</h2>

                </div>
                
            </div>
                  
            <div class="breaker"></div>
        
</body>
</html>


gbuch.php:

PHP 4:
<h2>Gästebuch</h2>
<LINK rel="stylesheet"type="text/css" href="style.css" media="all">
<?php


  



$name=$_POST['name'];
$email=$_POST['email'];
$message=$_POST['message'];
$www=$_POST['www'];
$action=$_POST['action'];

     define ("BASE_URI","c:/programme/easyphp1-8/www/test/");
     define ("BASE_URL","http://localhost/test/");
     define ("PREVIEW_URL","http://localhost");
    
     define ("DBHOST","localhost");
     define ("DBUSER","root");
     define ("DBPASSWORD","");
     define ("DATABASE","haha");
     define ("DBPORT","3306");
    
     define ("DATA_URI",BASE_URI."/data/");
     define ("DATA_URL",BASE_URL."/data/");
    
     define ("URL_FRONTEND","http://localhost");

    
    
    
    
    
    
    if(!empty($_POST['action'])) {
        
        
                    if($name=="") {
                        echo "<br />Fehler! Name nicht eingegeben";
                        }
                  
                    if($email=="") {
                        echo "<br />Fehler! Email nicht eingegeben";
                        }
                    if(!strpos($email,"@")) {
                        echo "<br />Fehler! Sie haben ein @-Zeichen bei Ihrer Email Adresse vergesssen";
        
                        }    
                    if($message=="") {
                        echo "<br />Fehler! Text nicht eingegeben";
                        }    
                        
                    if($www=="") {
                        echo "<br />Fehler! www nicht eingegeben";
                        }        
                }        
                
                
                
                
                if($message!="" && $email!="" && $name!="" && $www!="" && strpos($email,"@")) {
                    
                    include_once('class_mdb.php');
                    $db = new MDB();
                    
                    $timestamp=time(); //speichert Zeit in timestamp
                    $ip = getenv("REMOTE_ADDR"); //Speichert die IP in IP
                
                     //Speichert SQL anweisungen in db
                     $db->sql = "INSERT INTO
                                        gbuch
                                    SET
                                        name='"
.$name."',
                                        email='"
.$email."',
                                        www='"
.$www."',
                                        timestamp='"
.$timestamp."',
                                        ip='"
.$ip."',
                                        message='"
.$message."'";
                    
                    $db->executeQuery();  //Führt die Anweisungen von &db durch
                    
                  
                    echo "Danke für Ihren Eintrag <br />";

                    
                    ?><html><body bgcolor="blue"><a href="gbuch.php"><?echo "Zurück"?></a></body></html><?
                    
                
            


                }else {    

?>
                                <HTML>
                                    <head>
                                        </head>
                                            <body bgcolor="blue">
                                            <a href="index.php"><?echo "Zurück"?></a>
                                                <FORM action="gbuch.php" method="POST"  >
                                                    <p><center><h1>Name:</h1><input type="text" name="name"class="feld" value="<?=$name?>"></center></p>
                                                    <p><center><h1>Email:</h1><input type="text" name="email"class="feld"value="<?=$email?>"></center></p>
                                                    <p><center><h1>www:</h1><input type="text" name="www"class="feld"value="http://<?=$www?>""></center></p>
                                                    <p><center><TEXTAREA name="
message" cols="40"class="feld"rows="5" wrap="hard"><?=$message?></TEXTAREA></center></p>
                                                    <input type="
hidden" name="action" value="test">
                                                    
                                                    <center><input type="
submit" value="Absenden" class="buttons"></center>
                                                    <center><input type="
reset" value="löschen" class="buttons"></center>
                                                
                                                </FORM>
                                            
                                            </body>
                                </HTML>
                                
                        <?
                            




                        $conn = mysql_connect('localhost','root','');
                        //if (!$conn) { die("
kein zugriff auf möglich"); }
                        //else        { echo "
Connect erfolgreich :-D "; }

                        $DBok = mysql_select_db('haha',$conn);

                        //if (!$DBok) { die("
Konnte nicht Datenbank auswählen"); }
                         //else        { echo "
\nDB-Auswahl erfolgreich :-D "; }  

                        $query = "
SELECT * FROM gbuch ORDER BY id DESC";       //was der machen soll und woher
                    
                        $result =  mysql_query($query,$conn); // hab ich gefüllt mit den entsprechenden datensätzen
                    
                        $gesamt =  mysql_num_rows($result);   //speichert die anzahl der Zeilen in $gesamt
  
                           //echo "
Anzahl der Tupel: ".$gesamt;

                         mysql_close($conn);
  



                           while ($zeileholen =  mysql_fetch_array($result,MYSQL_ASSOC))
                        
                           {
                        
                               ?>
                        
                                           <html>
                                            <head>
                                            </head>
                                                <body bgcolor="
blue">
                                                
                                                    <table border="
1" class="table" align="center">
                                                    
                                                      <colgroup>
                                                        <col width="
100">
                                                        <col width="
300">
                                                       </colgroup>
                                                      <tr>
                                                               <td class="
rand">ID: <?=$zeileholen["id"]?></td>
                                                             <td class="
rand"><b>von</b> <?=$zeileholen["name"]?> <b>am &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp</b>   <? echo date(d,$zeileholen["timestamp"]).".";echo date(M,$zeileholen["timestamp"]).".";echo date(Y,$zeileholen["timestamp"]);?></td>
                                                      </tr>
                                                      <tr>
                                                    
                                                               <td class="
rand"><a href="mailto:<?=$zeileholen["email"]?>">Email</a> <br> <a href="http://<?=str_replace("http://","",$zeileholen["www"])?>">www</a><br> IP: <?=$zeileholen["ip"]?></td>
                                                               <td class="
rand"><?= str_replace("script", "",$zeileholen["message"])?> </td>
                                                      </tr>
                                                    
                                                    </table> <br>
                                                </body>    
                                            </html>
                                            
                        
                        
                        
                           <?}


        
                            
                                
                    }?>            



style.css:


PHP 4:
* {
    font-family                : Verdana;
}

body {
    margin                    : 0px;
}


.breaker {
    clear                    : both;
}

||LC01||    float                    : left;
    width                    : 234px;
    margin-left                : 21px;
}

||LC01||    margin-top                : 4px;
    margin-left                : 8px;
    width                    : 234px;
}

||LC01||    width                    : 540px;
    float                    : left;
    margin-left                : 0px;
}

||LC01||    margin-bottom            : 0px;
    margin-top                : -3px;
    width                    : 185px;
    height                    : 90px;
    background-image        : url('images/background.png');
    background-repeat        : repeat-y;
    margin-left                : 27px;

}


||LC01||    margin-bottom            : 0px;
    width                    : 185px;
    height                    : 90px;
    background-image        : url('images/background.png');
    background-repeat        : repeat-y;
    margin-left                : 27px;

}    

||LC01||    margin-bottom            : 0px;
    width                    : 185px;
    height                    : 90px;
    background-image        : url('images/background.png');
    background-repeat        : repeat-y;
    margin-left                : 27px;

}    


||LC01||    width                    : 185px;
    height                    : 90px;
    background-image        : url('images/abschluss.png');
    background-repeat        : repeat-y;
    margin-left                : 42px;
    margin-top                : 0px;

}



||LC01||    width                    : 460px;
    margin-left                : 45px;
}

||LC01||    margin-bottom            : 0px;
    margin-left                : -46px;

}


||LC01||    margin-top                : 25px;

}

||LC01||    font-weight                : normal;
    color                    : ||LC01||    margin-bottom            : 0px;
    margin-left                : 45px;
}

||LC01||    width                    : 450px;
    margin-top                : 20px;
    margin-left                : 45px;
    font-family                : Arial;
    font-size                : 9pt;
}    


||LC01||    background-image        : url('images/dotted_line.png');
    height                    : 1px;
    width                    : 100%;
    overflow                : hidden;
}

/* ------------------------------------------------------------------------------------------- */

h1 {
    font-size                : 10pt;
    font-weight                : bold;
    color                    : black;
    margin-bottom            : 0px;
    margin-left                : -115px;
}

h2 {
    font-size                : 20pt;
    font-weight                : bold;
    color                    : black;
    margin-bottom            : 0px;
    text-align                : center;
    
}

.menu {
    display                    : block;
    padding-left            : 5px;
    margin-left                : 60px;  
    text-decoration            : none;
    font-size                : 15pt;
    color                    : black;
}

.menu:hover {
    display                    : block;
    padding-left            : 5px;
    margin-left                : 60px;  
    text-decoration            : none;
    font-size                : 15pt;
    color                    : blue;
}

.feld {
    background-color        : ||LC01||    border-color            : white;
}

.table {

    border                    : solid thin black;
    width                    : 500px;
    align                    : center;
     background-color        : ||LC01||     font-size                : 10pt;
     <!--border-collapse            : collapse;-->

}

.rand {
    border: thin solid blue;
    border-spacing: 0px;
}    

.buttons {
    background-color        : ||LC01||    border                    : solid thin black;
    margin-left                : -20px;
}



 
Profil || Private Message || Suche Download || Zitatantwort || Editieren || Löschen || IP
002
01.08.2006, 12:42 Uhr
rejo



Ich bin mir nicht soo sicher was du meinst aber vielleicht hilft dir das weiter:
http://tut.php-q.net/frames.html

EDIT: Sorry hab Mist geredet

Dieser Post wurde am 01.08.2006 um 12:51 Uhr von rejo editiert.
 
Profil || Private Message || Suche Download || Zitatantwort || Editieren || Löschen || IP
003
01.09.2006, 16:48 Uhr
xXx
Devil


hmm dann includier das doch da ...
 
Profil || Private Message || Suche Download || Zitatantwort || Editieren || Löschen || IP
Seiten: > 1 <     [ HTML / XML / XHTML ]  


ThWBoard 2.73 FloSoft-Edition
© by Paul Baecher & Felix Gonschorek (www.thwboard.de)

Anpassungen des Forums
© by Flo-Soft (www.flo-soft.de)

Sie sind Besucher: