Announcement

Collapse
No announcement yet.

cookie

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • cookie

    Hallo,

    Wie kann man einen Cookie in einer if-anweisung setzen?

    Beispiel:

    Code:
    $i = true;
    if ($i == true) {
    $inhalt = "PHP";
    setcookie("php", $inhalt, time()+600);
    }
    Dann kommt aber:

    Warning: Cannot modify header information - headers already sent by (output started at D:\xampp\htdocs\***\test30.php:7) in D:\xampp\htdocs\Philipp\test30.php on line 19

  • #2
    Hallo php 2511,

    das Problem ist das gleiche wie im Thread Session Problem der hier in diesem Forum vor ein paar Tagen diskutiert wurde.
    Bitte erstmal dort nachlesen!

    Gruß Falk
    Wenn du denkst du hast alle Bugs gefunden, dann ist das ein Bug in deiner Denksoftware.

    Quellcode ohne ein Mindestmaß an Formatierung sehe ich mir nicht an! Ich leiste keinen Privatsupport per Mail oder PN!

    Comment

    Working...
    X