0

Hello! I need help about fwrite option ,i have this script
and need write everytime that $id , but my problem is when the script have another id delete the first one and rewrite the new one.i need to have old and write the new without rewrite the old $id.Thank you in advance.

<?php
if($id = isset($_REQUEST['file']) ? $_GET['file'] : ''){
$myFile = "urls.txt";
$fh = fopen($myFile, 'c') or die("can't open file");
$stringData = $id;
fwrite($fh, $stringData);
fclose($fh);

} else { echo "You dont put any id <br /> <br />";
    }

?>
1
Contributor
1
Reply
11
Views
4 Years
Discussion Span
Last Post by arjani10
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.