I'm looking for a way to load a .inc file line by line with the option to use some form of selection (radio button, check box) and a form to delete the checked lines.
<table width="175" border="0" cellspacing="0" cellpadding="0">
<?php
$links = array();
include("links.inc");
foreach ($links as $key => $value) {
if(is_array($value))
foreach($value as $key2 => $href) { $x++;
if($QUERY_STRING == $href)
echo "<tr align=left valign=middle>
<td width=18>
<img src=img/bulleton.gif border=0>
</td>
<td width=157>
<a href=$href>$key2</a>
</td>
</tr>\n";
else
echo "<tr align=left valign=middle>
<td width=18>
<img src=img/bullet.gif border=0 name=l$x id=l$x>
</td>
<td width=157>
<a href=$href onMouseOver=l$x.src='img/bulletover.gif' onMouseOut=l$x.src='img/bullet.gif'>$key2</a>
</td>
</tr>\n";
}
}
?>
</table>
The links.inc file contains the multidimensional array, each line is a new entry on the menu. The else check on the echoing of the tables changes the current link image to a different color, indicating that you are currently on that page.
I can handle writing up the script to add lines... as for removing them easily (outside of having them do it manually from a text area). That evades me.
Ideas anyone?