Vraag & Antwoord

Webprogrammeren & scripting

[PHP] - Waarde van de cookie verdwijnt.

Anoniem
Jakobvk
1 antwoord
  • Ik heb in mijn code het volgende staan:[code:1:29386b735f] $aerypton [totalattachments]++;
    $aerypton [attachmentname] [$aerypton [totalattachments]] = $aerypton [totalattachments] . "_" . stripslashes ($HTTP_POST_FILES ["file_name"] ["name"]);
    $aerypton [attachmentfilename] [$aerypton [totalattachments]] = stripslashes ($HTTP_POST_FILES ["file_name"] ["name"]);

    if (copy ($HTTP_POST_FILES ["file_name"] ["tmp_name"], "../temp/" . $aerypton [id] . "/" . $aerypton [totalattachments] . "_" . stripslashes ($HTTP_POST_FILES ["file_name"] ["name"]))) {
    setcookie ("aerypton [totalattachments]", $aerypton [totalattachments]);
    setcookie ("aerypton [attachmentname] [$aerypton [totalattachments]]", $aerypton [attachmentname] [$aerypton [totalattachments]]);
    setcookie ("aerypton [attachmentfilename] [$aerypton [totalattachments]]", $aerypton [attachmentfilename] [$aerypton [totalattachments]]);

    print ("<script language=\"javascript\">");
    print (" opener.document.forms[\"form\"].mode.value = \"attachment\";");
    print (" opener.DoSubmit ();");
    print (" window.close ();");
    print ("</script>");

    exit;
    } else {
    $failure = true;
    }[/code:1:29386b735f]Telkens als ik de pagina herlaad is de waarde van $aerypton [totalattachments] terug 0. Hoe komt dit? Het zou elke keer eentje meer moeten zijn.

Beantwoord deze vraag

Dit is een gearchiveerde pagina. Antwoorden is niet meer mogelijk.