fwrite error

Discussion in 'PHP' started by Voimis, Oct 1, 2007.

  1. #1
    <?php

    $artist = $_POST['artist'];
    $year = $_POST['year'];
    $name = $_POST['name'];

    $row = $artist . $year . $name;

    $listing = fopen("recordlist.txt","a");
    fwrite($listing, $row . "\n");
    fclose($listing);
    header('Location: recordlist.txt');

    ?>

    It doesn´t work and I can´t find the problem. So the code is for posting my cd:s to that recordlist.txt file. Help please!
     
    Voimis, Oct 1, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    And the error is?

    EDIT;

    Is the file writable? (Permissions right?)
     
    nico_swd, Oct 1, 2007 IP
  3. Voimis

    Voimis Peon

    Messages:
    60
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Oh my god what a noob I am! Rights were missing :D


    Thanks for the help!
     
    Voimis, Oct 1, 2007 IP