Ist auch shcon alt. Mittlerweile habe ich
<!-- w --><a class="postlink" href="http://www.riensartwork.de">http://www.riensartwork.de</a><!-- w -->
Ist auch shcon alt. Mittlerweile habe ich
<!-- w --><a class="postlink" href="http://www.riensartwork.de">http://www.riensartwork.de</a><!-- w -->
hmm...der nimmt die index.php nicht an. Der zeigt nur die index.html.
Kann man denn die index als php verwenden?
Sie sieht im Moment so aus
<body>
<?php session_start() ?>
<div id="seitenbegrenzung">
<div id="kopfbereich">
<a href="index.php">
<img src="styles/RiensArtwork2.jpg" alt="" style="display: block; margin: auto;" />
</a>
<!-- Sprache wählen -->
<form id="changeLang" method="post" action="changeLang.php">
<select name="lang" onchange="document.getElementById('changeLang').submit();">
<option selected="selected">choose Language</option>
<option value="en">English</option>
<option value="de">Deutsch</option>
</select>
<input type="hidden" name="backlink" value="<?php echo $_SERVER['PHP_SELF'];?>" />
</form>
</div>
<div id="steuerung">
<ul id="navi">
<li><a href="index.php">Home</a></li>
<li><a href="about.php">About</a></li>
<li><a href="#">Gallery</a>
<ul>
<li><a href="nature.php">Nature</a></li>
<li><a href="space.php">Space</a></li>
</ul>
</li>
<li><a href="video.php">Video</a></li>
<li><a href="gaestebuch.php">Guestbook</a></li>
<li><a href="contact.php">Contact</a></li>
</ul>
</div>
<div id="inhalt">
<h1>Home</h1>
<br />
<?php
function selectLanguage(array $content)
{
if(isset($content[$_SESSION['lang']]))
{
return $content[$_SESSION['lang']];
}
else
{
return current($content);
}
}
?>
<?php
echo selectLanguage(array(
"en" => "
Welcome to Riens Artwork,
<br /><br />
this site is devoted to displaying my numerous works,
which is being continually updated. All paintings found
on this site are done entirely with spraycan paint and<br />
some basic tools, and are all spraypainted on regular
glossy photo paper. Each painting is one of a kind and
no two paintings are totally alike, as it is impossible<br />
to replicate a piece of art. All paintings found on this
site are all originals. The galleries provided are
continuously being updated with new paintings, so make<br />
sure that you check it out regularly. It is also used as
the primary resource regarding information about me and
my background as an artist, as well as a means to contact
me,<br />
whether it be for commission work, gallery
opportunities, or even just for general information
about the art itself.
<br /><br />
Please have a look around and take a minute to contact me
if you have questions.
<br /><br />
Welcome and enjoy."
"de" => "
Hallo "
)
)
?>
</div>
</div>
<div id="fusszeile">
© Copyright by RiensArtwork - <a href="impressum.php">Imprint/Disclaimer</a>
</div>
</body>
Alles anzeigen
Und das heißt so viel wie?
Der hat ein Problem mit
<form id="changeLang" method="post" action="changeLang.php">
<select name="lang" onchange="document.getElementById('changeLang').submit();">
<option selected="selected">choose Language</option>
<option value="en">English</option>
<option value="de">Deutsch</option>
</select>
<input type="hidden" name="backlink" value="<?php echo $_SERVER['PHP_SELF'];?>" />
</form>
Es sieht bei mir im Moment so aus
</head>
<?php session_start() ?>
<body>
<div id="seitenbegrenzung">
<div id="kopfbereich">
<a href="index.html">
<img src="styles/RiensArtwork2.jpg" alt="" style="display: block; margin: auto;" />
</a>
<!-- Sprache wählen -->
<form id="changeLang" method="post" action="changeLang.php">
<select name="lang" onchange="document.getElementById('changeLang').submit();">
<option selected="selected">choose Language</option>
<option value="en">English</option>
<option value="de">Deutsch</option>
</select>
<input type="hidden" name="backlink" value="<?php echo $_SERVER['PHP_SELF'];?>" />
</form>
</div>
<div id="steuerung">
<ul id="navi">
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="#">Gallery</a>
<ul>
<li><a href="nature.html">Nature</a></li>
<li><a href="space.html">Space</a></li>
</ul>
</li>
<li><a href="video.html">Video</a></li>
<li><a href="gaestebuch.php">Guestbook</a></li>
<li><a href="contact.php">Contact</a></li>
</ul>
</div>
<div id="inhalt">
<h1>Home</h1>
<br />
<?php
function selectLanguage(array $content)
{
if(isset($content[$_SESSION['lang']]))
{
return $content[$_SESSION['lang']];
}
else
{
return current($content);
}
}
?>
<?php
echo selectLanguage(array(
en = "
Welcome to Riens Artwork,
<br /><br />
this site is devoted to displaying my numerous works,
which is being continually updated. All paintings found
on this site are done entirely with spraycan paint and<br />
some basic tools, and are all spraypainted on regular
glossy photo paper. Each painting is one of a kind and
no two paintings are totally alike, as it is impossible<br />
to replicate a piece of art. All paintings found on this
site are all originals. The galleries provided are
continuously being updated with new paintings, so make<br />
sure that you check it out regularly. It is also used as
the primary resource regarding information about me and
my background as an artist, as well as a means to contact
me,<br />
whether it be for commission work, gallery
opportunities, or even just for general information
about the art itself.
<br /><br />
Please have a look around and take a minute to contact me
if you have questions.
<br /><br />
Welcome and enjoy."
de = "
Hallo "
)
)
?>
</div>
</div>
<div id="fusszeile">
© Copyright by RiensArtwork - <a href="impressum.html">Imprint/Disclaimer</a>
</div>
</body>
</html>
Alles anzeigen
Beim Array
Unterscheidet er auch nicht. Kannst ja mal auf <!-- m --><a class="postlink" href="http://www.riensartwork.de/index.html">http://www.riensartwork.de/index.html</a><!-- m --> gehen
Achso..also dann so
bsp
Am Anfang des <body>
function selectLanguage(array $content){
if(isset($content[$_SESSION['lang']])){
return $content[$_SESSION['lang']];
} else {
return current($content);
}
div mit den Texten
<div id="inhalt">
<h1>Home</h1>
<br />
echo selectLanguage(array(
"en" => "Welcome to Riens Artwork,
<br /><br />
this site is devoted to displaying my numerous works,
which is being continually updated. All paintings found
on this site are done entirely with spraycan paint and<br />
some basic tools, and are all spraypainted on regular
glossy photo paper. Each painting is one of a kind and
no two paintings are totally alike, as it is impossible<br />
to replicate a piece of art. All paintings found on this
site are all originals. The galleries provided are
continuously being updated with new paintings, so make<br />
sure that you check it out regularly. It's also used as
the primary resource regarding information about me and
my background as an artist, as well as a means to contact
me,<br />
whether it be for commission work, gallery
opportunities, or even just for general information
about the art itself.
<br /><br />
Please have a look around and take a minute to contact me
if you have questions.
<br /><br />
Welcome and enjoy."
"de" => "deutscher text"
</div>
Alles anzeigen
Wenn du schnelles haben willst, musst du dafür bezahlen!
Das ist ich müsste in meine #div Inhalt jeweils die jenige Sessionvariable mich echo ausgeben?
Frage,
wie prüfe ich diesen Arraywert?
wie gebe ich ihn aus?
Jaja, dass mit den 2 Versionen war mehr so ein Gedankengang...der hätte vor dem Satz davor kommen müssen^^
Ich weiß nicht ob das zu viel verlangt ist, aber könntest du mir dabei helfen ein Beispiel dieser Array-Funktion zu erarbeiten?
Ich denke das ich dann selbst jeweils das anpassen kann.
Ich glaube das müsste sogar mit Session gemacht werden...das am Anfang ein Link gedrückt wird, der eine Session startet, die den Inhalt der Sprache enthält. Und sobald die Seite verlassen wird, wird die Session beendet.
Könnte das so richtig sein?
Hey Leute,
da ich meine Seite auf Englisch gestaltet habe, liegt es im großen Interesse an mir diese auch auf Deutsch zu gestalten.
Frage jetzt, wie kann ich es am ökonomischsten realisieren das dieses Vorhaben nicht zu viel Platz auf meinem Webspace einnimmt. Dachte im Moment an das einfachste und zwar 2 Verionen der Seite zu erstellen.
Ist dies überhaupt mit PHP realisierbar?
Oder müsste ich das mit neuen StyleSheet machen?
Danke im Vorraus
Alles klar, ich habs geschafft
Der Fehler lag an der Eingabebereinigung (Die hatte ich 2x drin). Einmal ganz oben nach dem "session_start()" und einmal in der letztn if-Anweisung in der der Eintrag dann in die Datenbank erfolgt (und da musste sie raus)
array_walk ( $_POST, 'eingabebereinigen' );
array_walk ( $_GET, 'eingabebereinigen' );
array_walk ( $_REQUEST, 'eingabebereinigen' );
function eingabebereinigen(&$value, $key)
{
// keine HTML-Tags erlaubt, außer p und br
$value = strip_tags($value, '<p><br /><b><strong>');
// HTML-Tags maskieren
$value = htmlspecialchars($value, ENT_QUOTES);
// Leerzeichen am Anfang und Ende beseitigen
$value = trim($value);
}
Alles anzeigen
Danke für eure Hilfe
Wo schreib ich denn den Code hin in dem ich das Array zum String mache?
Ich gehe mal davon aus, dass das damit ($_SESSION['captcha-wert'] = implode($text);) nicht geht
Mir stellt sich die Frage, muss ich das in die Captcha.php einbinden, wenn ja wohin am besten?
Alles klar, funktioniert...Bild wird angezeigt und Code kommt auch
ABER
Der Code wird nicht angenommen...das Problem hatte schon jemand hier...weiß nur nicht wie das zu lösen geht.
Liegt auf jedenfall daran, dass ich einen String mit einem Array vergleichen will oder so.
War bei mir aber nicht der Fall...als ich das mal gemacht hatte...
Danke, ich werds mal versuchen
HTML-Seminar.de - mit Videos zum schnellen Lernen, wie man eine Website selbst erstellt.