Location: PHPKode > projects > PHP Fan Fiction > PHP Fan Fiction/stories.php
<!--START OF PHP FANFICTION CODE-->

<!--USER EDITABLE AREA-->

<h3 align="center">Our Stories</h3> <p>Welcome to our list of stories.  All stories on this page are classified as <b>Family Safe</b> meaning they have a 
maximum rating of PG-13.   You can find our adult stories <a href="adultstories.php">here.</a> Stories are listed in the order they we're published, with 
the newest stories at the top of the list.<br />

<!--END OF EDITABLE AREA-->

<!--DO NOT EDIT BELOW THIS LINE UNLESS YOU ARE COMPETANT IN PHP CODING-->

<?php
$fp = fopen('storydb.txt','r');
if (!$fp) {echo 'ERROR: Unable to open file.'; exit;} 
 
while (!feof($fp)) {
$line = fgets($fp, 1024); //use 2048 if very long lines
list ($field1, $field2, $field3, $field4, $field5, ) = split ('\|', $line);
echo '
<tr>
<td><P><B><a href="s/'.$field4.'">'.$field1.'</a></b>
<br><b>'.$field2.'</b> <br>
'.$field3.'</td></br>

</tr>';
$fp++;
} 
 
fclose($fp); 
 
?></P>

<!--Do NOT DELETE THIS LINE-->

<p style="font-size:8px;font-color:#cccccc">Powered by PHP Fan Fiction V1.0</p>
  
<!--END OF PHP FANFICTION CODE-->
Return current item: PHP Fan Fiction