Hi guys, I'm kind new to the whole php thing.
Currently got a website that has a news page and an admin page. in the admin page there is a text area and a submit button.
CLick the submit button and it updates a file called headline.txt with whatever was in the textarea and consequently updates the news page.
All very basic. However, when I go back to the admin page, only the first line of the headline.txt is called back.
Code for the admin input form:
<form action="update.php" method="GET">
<?
$prevalue = file("./headline.txt");
?>
<textarea name="headline" style="width:100%; height:600px"><? echo $prevalue[0]; ?></textarea>
<input type="submit" value="Update Headline">
</form>
I assume its something wrong this side as the news page updates all the text, not just 1 line.
Any ideas? Need more info?