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.

PHP Cookie

Empfohlene Antworten

Ich hab noch eine Frage,

wie kann ich denn in Php ein cookie setzen das dann bei jedem Seitenaufruf sagt "Hallo Herr XYZ sie sind zum 3 ten mal auf der seite" ???

Ich habs mit setcookie("abc", $variable); versucht, aber ned geschaftt!

MfG McMaiers

fehlermeldung?

Ohne die Fehlermeldung zu kennen, tippe ich einfach mal auf einen der häufigsten Gründe: es gab vorher bereits eine Ausgabe.

Deine Seite muß dementsprechend mit <? anfangen. Selbst ein Leerzeichen davor führt dazu, daß setcookie nicht funktioniert. Übrigens liefert setcookie den Wert true zurück, wenn es geklappt hat. Daraus kannst Du aber nicht automatisch schließen, daß der Benutzer den Cookie akzeptiert hat.

Warning: Cannot modify header information - headers already sent by (output started at C:\Programme\Apache Group\Apache2\htdocs\projekt\cookie.php:6) in C:\Programme\Apache Group\Apache2\htdocs\projekt\cookie.php on line 7

:confused:

Original geschrieben von McMaiers

Warning: Cannot modify header information - headers already sent by (output started at C:\Programme\Apache Group\Apache2\htdocs\projekt\cookie.php:6) in C:\Programme\Apache Group\Apache2\htdocs\projekt\cookie.php on line 7

:confused:

servus!

wie Rohde bereits sagte:

du hast ne ausgabe vor dem header() oder setcookie()!

die muss nach dem aufruf der obengenannten funktionen!!

dazu zählt auch "<html>" usw... JEDE Form einer Ausgabe an den Client also!

Gruß

Azrael

einfach boardsuche verwenden. den fehler gabs schon öfter

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

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.