Jump to content

PHP in tables?


fert

Recommended Posts

[code]
<table border="1" width="100%">
<tr>
<td><?php //code to see if the topic is open or closed
$file=@fopen("_private/website_Pyrokinetic_1_what_to_post_here_replies.txt","r");
$num=@fread($file,filesize("_private/Pyrokinetic_1_what_to_post_here_status.txt"));
@fclose($file);
                                       if($num=="0")
{
echo "<img border=0 scr=www.usnet1.net/open.jpg alt=\"This thread is closed\">";
}
else
{
echo "<img border=0 scr=www.usnet1.net/lock.jpg alt=\"This thread is open\">";
}


?>
</td>
<td width="511">What to post here<p><font size="1">Pyrokinetic_1</font></td>
<td width="92"><?php //the number of replies
$address="_private/website_Pyrokinetic_1_what_to_post_here_replies.txt";
$file=@fopen($address,"r");
$num=@fread($file,filesize($address));
@fclose($file);

echo "$num";
?>
</td>
<td width="94"><?php //number of views
$file=@fopen("_private/website_Pyrokinetic_1_what_to_post_here_views.txt","r");
$num=@fread($file,filesize("_private/Pyrokinetic_1_what_to_post_here_views.txt"));
@fclose($file);

echo "$num";
?>
</td>
<td width="106"><?php //the date it was posted
$file=@fopen("_private/website_Pyrokinetic_1_what_to_post_here_date.txt","r");
$time=@fread($file,filesize("_private/Pyrokinetic_1_what_to_post_here_date.txt"));
@fclose($file);

echo "$time";
?>
</td>
</tr>
</table>
[/code]
Link to comment
https://forums.phpfreaks.com/topic/13267-php-in-tables/#findComment-51076
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.