<html>

<body>

<?php

$var=$_GET['stuff'] . "\n";

$fh=fopen('savedstuff.txt','ab');

fwrite($fh,$var);

fclose($fh);

?>

</body>

</html>

well i have noticed that $var only takes string of length 250 anything greater than that it doesnt write it in the savedstuff.txt

i.e

javascript:void(document.location="hellion/test.php?stuff=" +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxaaaaaaaaaa)

the number of x's = 250
so when run the above code the a's are not written inside the savedstuff.txt
can u help me with this problem??
what if i want to pass some information that has string length more than 250 ???


and well thanx for reading :D

fwrite has a third parameter that is the length to be written.If you don't have a copy of the PHP manual, you should download a copy.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.