PHP 1
Untitled Guest on 17th March 2018 01:30:31 AM
  1. $fil = fopen("temp/demo.txt","a");
  2. if($fil==false)
  3. {
  4.     echo "Klarte ikke å åpne filen!";
  5. }
  6. else
  7. {
  8.     fwrite ($fil, "Dato og Tid: " . $_SESSION["dato"] . "\r\n");
  9.     fwrite ($fil, "Fornavn: " . $_SESSION["fornavn"] . "\r\n");
  10.     fwrite ($fil, "Etternavn: " . $_SESSION["etternavn"] . "\r\n");
  11.     fwrite ($fil, "Email: " . $_SESSION["email"] . "\r\n");
  12.     fwrite ($fil, "Registrert?: " . $_SESSION["reg"] . "\r\n");
  13.     fwrite ($fil, "Tema: " . $_SESSION["valg"] . "\r\n");
  14.     fwrite ($fil, "Kommentar: " . $_SESSION["kommentar"] . "\r\n");
  15.    
  16.     fclose($fil);
  17. }

HGC Paste is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.