Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

hallo...

ich bin gerade dabei mir ein guestbook für meine homepage mit php zu scripten... aber irgendwie wenn ein neuer entry gemacht wurde, wird der vorhandene entry gelöscht...d.h. es ist imemr nur ein entry da, un dieser wird überschrieben wenn ein neuer dazukommt...

hier sind mal die scripte die ich bis jetzt habe... (sind noch nicht ganz ausgearbeitet...)

DATEI: guestbook.php

<html>

<head>

<title>

>>xxx<<

</title>

<style type="text/css"><!--

BODY {

scrollbar-base-color: #333333;

scrollbar-track-color: #555555;

scrollbar-face-color: #555555;

scrollbar-highlight-color: #333333;

scrollbar-3dlight-color: #555555;

scrollbar-darkshadow-color: #555555;

scrollbar-shadow-color: #333333;

scrollbar-arrow-color: #FDD901;

}

--></style>

<style type="text/css">

<!--

body {

padding: 0;

margin: 0;

color: #333333;

}

ul {

list-style: none;

}

ul {

padding: 0;

margin-left: 15px;

}

a {

color: #333333;

font: 1em Verdana, sans-serif;

font-weight: bold;

text-decoration: none;

}

a:link {

color: #333333;

font: 1em Verdana, sans-serif;

font-weight: bold;

}

a:visited {

color: #333333;

font: 1em Verdana, sans-serif;

font-weight: bold;

}

a:hover {

color: #FDD901;

font: 1em Verdana, sans-serif;

font-weight: bold;

}

-->

</style>

</head>

<body bgcolor="#333333">

<table width="500" border="0" cellpadding="0" cellspacing="1">

<form action="write.php" method="post">

<tr>

<td>

<font face="Verdana" color="#FDD901" size="3">

Name:

</font>

</td>

<td>

<input type="text" name="name" size="20">

</td>

</tr>

<tr>

<td>

<font face="Verdana" color="#FDD901" size="3">

eMail:

</font>

</td>

<td>

<input type="text" name="email" size="20">

</td>

</tr>

<tr>

<td>

<font face="Verdana" color="#FDD901" size="3">

ICQ#:

</font>

</td>

<td>

<input type="text" name="icq" size="20">

</td>

</tr>

<tr>

<td>

<font face="Verdana" color="#FDD901" size="3">

Homepage:

</font>

</td>

<td>

<input type="text" name="homepage" size="20">

</td>

</tr>

<tr>

<td>

<font face="Verdana" color="#FDD901" size="3">

Nachricht:

</font>

</td>

<td>

<textarea name="nachricht" rows="8" cols="67"></textarea>

</td>

</tr>

<tr>

<td>

<font face="Verdana" color="#FDD901" size="3">

Aktion:

</font>

</td>

<td>

<input type="submit" name="submit" value="senden" size="15">

<input type="reset" name="reset" value="reset" size="15">

</td>

</tr>

</table>

<?php

include("entry.txt");

?>

</form>

</body>

</html>

----------------------------------------

DATEI: write.php

<html>

<head>

<title>

</title>

</head>

<body>

<?php

$name = $HTTP_POST_VARS['name'];

$email = $HTTP_POST_VARS['email'];

$icq = $HTTP_POST_VARS['icq'];

$homepage = $HTTP_POST_VARS['homepage'];

$nachricht = $HTTP_POST_VARS['nachricht'];

$date = date("d.m.Y H:i");

$entry = fopen("entry.txt","w");

$nachricht=strip_tags($nachricht);

$x = 0;

$dateiname = "entry.txt";

$datei = fopen($dateiname, "r");

while (!feof($datei)) {

$x++;

$saved[$x] = fgets($datei, 1024);

}

fwrite($entry,"<table width='467' border='0' cellspacing='0' cellpadding='0'>

<tr>

<td>

$date

</td>

</tr>

<tr>

<td><a href='mailto:$email'>$name</a>

</td>

</tr>

<tr>

<td><a href='$homepage'>$homepage</a>ICQ: $icq

</td>

</tr> <tr>

<td class='guestbook'>$nachricht

</td>

</tr>

</table>

<br>

");

for ($i=1;$i <= $x; $i++) {

fwrite($datei, "$saved[$i]");

}

fclose($datei);

?>

Eintrag wurde gesendet

<a href="guestbook.php">zurück</a>

</html>

-----------------------------------

als datei wo die entries reingeschriebn werden habe ich entry.txt

wer sich das angucken möchte: http://web395.spacefree.de/guestbook/guestbook.php

bzw.

http://web395.spacefree.de/guestbook/write.php

vielen dank im voraus!!

kann es sein das ich die variablen wieder "nullen" muss nachdem der eintrag geschrieben wurde?!?!?!

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.