View Single Post
  #3 (permalink)  
Old 04-24-07, 08:33 PM
Andy128 Andy128 is offline
Wannabe Coder
 
Join Date: Jun 2006
Posts: 239
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks- but where would I put it in relation to this code:
PHP Code:

<?php

if(!file_exists("listings.txt"))
{
echo
"<center><b>List your Bussiness or Service here!!.</center></b><br/>
<center>Get your self a web presence and free advertizing.</center></br></br>"
;
exit;
}
?>
<!------IF the file DOES exist- continue on------>
<!------Now process the info in the file--------->
<?php
$openedfile 
fopen"listings.txt"'r' );
if(
$openedfile)
{
while (!
feof$openedfile ) )
    {
        
$line trim(fgets$openedfile ));
        if ( !empty( 
$line ) )
        {
            list(
$category$bizname$bizaddress$bizphone$line1$line2$comment) = explode"|"$line );
?>
<table>
    <tr >
        <td width="380" align="center" bgcolor="#ffde5e">
        <FONT COLOR="#0000ff" size="5"</FONT><b><?=$bizname;?></b></td>
    </tr>
    <tr >
        <td width="380" align="center"><?=$bizaddress;?></td>
    </tr>
    <tr >
        <td width="380" align="center"><?=$bizphone;?></td>
    </tr>
    <tr >
        <td width="380" align="center"><?=$line1;?></td>
    </tr>
    <tr >
        <td width="380" align="center"><?=$line2;?></td>
    </tr>
    <tr >
        <td width="380" align="center"><?=$comment;?></td>
    </tr>
</br>
<?
}
}
    
fclose$openedfile );
}
else
{
?>
    <tr>
        <td width="380" align"center">Cannot open file!</td>
    </tr>
<?
}
?>
</table>
Sorry for not totally understanding this.

Andy
Reply With Quote