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="msn@msn.com" title="msn@msn.com"></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...
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.