hey i’ve got s simple php script that i use to just add some text to a .txt file and it shows up on my site…but i have a problem…
check out this link http://www.band-central.net/fanlist/fanlist.php
you will see the first entry shows ok but then it only shows the first two lines of the 2nd then pushes the rest onto the next page…try posting and it will do the same…does anyone know why this is happening?
sorry forgot to mention i need 10 entries per page
this is my code for the addfan.php page :
<?php
if ($message != '')
{
$message = str_replace ("
","<br>",$message);
$message = strip_tags ($message, '<br>');
$newRow = '<br><strong>Name :</strong> ' . ($name) . '<br>
<strong>E-Mail :</strong> <a href="mailto:' . ($email) . '">' . ($email) . '</a> <br>
<strong>D.O.B :</strong> ' . ($dob) . '<br>
<strong>Location :</strong> ' . ($location) . ' <br>
<strong>Fav. Ateyu Song :</strong> ' . ($fav_song) . ' <br>
<strong>Fav. Bands :</strong> ' . ($fav_bands) . ' <br>
<strong>Message :</strong> ' . ($message) . ' <br>
<br><img src="border.jpg" width="300" height="5"><br>';
$oldRows = join ('', file ('fans.txt') );
$fileName = fopen ('fans.txt', 'w');
fputs ($fileName, $newRow . chr(13) . chr(10) . $oldRows);
fclose ($fileName);
}
include ("fanlist.php");
?>