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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.