Jump to content

Listing / Editing content of textfile in a nice way


XeroXer

Recommended Posts

Hi there!
I have a clanscript where an admin can enter information about all the players and it gets saved to a textfile.
THe trouble comes when he wants to edit the info he entered.
Since he isn't good on html and the only way I know to show this is listing the whole file content in a textarea this becomes a problem.
I have a database but isn't going to use it with this project.
The person who wants this script does not have a database on his site so that's why I'm making without.
Anyone have any tip on listing file content in a good way so editing and deleting will be easy?
Every entry is one row in the file and looks something like this:
[code]
<tr height="18" bgcolor="#000000">
<td align="left" valign="middle" width="18"><img src="cs.gif" width="16" height="16" title="Counter-Strike" alt="Counter-Strike"></td>
<td align="left" valign="middle" width="18"><img src="country/se.gif" width="16" height="11" title="Sweden" alt="Sweden"></td>
<td align="left" valign="middle" width="265">Karl '<strong>User1</strong>' Sturesson</td>
<td align="left" valign="middle" width="18"><img src="minus.gif" class="showstate" onClick="expandcontent(this, 'user1')"></td>
<td align="center" valign="middle" width="45">age: 25</td>
<td align="right" valign="middle" width="18"><img src="msn.gif" width="16" height="15" border="0" alt="[email protected]" title="[email protected]"></td>
<td align="right" valign="middle" width="18"><a href="irc://se.quakenet.org/ircchannel" title="#ircchannel"><img src="mirc.gif" width="16" height="15" border="0" alt="#ircchannel"></a></td>
</tr>
<tr height="72" bgcolor="#000000" id="user1" class="switchcontent">
<td colspan="7" align="left" valign="top">Info for user number 1.</td>
</tr>
[/code]
To make it easier for you to see what it contains I but som rowchange in there.
But in the file all this is on one single row.
The javascript is part of an expand/contract menu so it's supposte to be ther :)...

If anyone could help me with a better way to edit multiple entrys in a textfile I would be ever so thankfull...

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.