I want to be able to take a config file and have a php script make a form to edit the fields so the user can edit the config file easaly and not have to open it via notepad or something like textpad too..
---------------- config file ------------------
# Alternating Colors for the rows
$odd_row_color = 'lavender';
$even_row_color = 'lightsteelblue';
# number of listings per page - page lister
$per_page=20;
# Page to start out with on Options section
$options_page="DISPLAY";
#stylesheet Default
$default_ccs_style = "/dragongally/styles/drago
n1.css";
//C:\home\www\sexytgpgalle
ries.com\d
ragongally
\
#Default Message for Edit/Update Galleries
$message = "";
$BDversion = "PHP v0.4 Alpha Registered";
$sitedomain="SexyTGPGaller
ies.com";
--------------------------
----------
----------
----------
----------
----------
-----
ok i want to be able to have php make a form automaticaly(no matter how many entries there are in config file)
and some things like $BDversion i do not want them to be able to edit
i remeber this in perl being done but i forgot where i saw it..so i know this is posible...
they did it by reading in the # (commented) lines and useing that info as in first # was the header of what it was(is) the second # was was it editble to user or read in as varible.
then anything till the next # is for that headding..as did it parse out the varible name and split it at the = sign for being able to write it back to the file and make the form...
id also like this all to be commented please so i can understand why each line is there(thanks)
so i can learn from it please
oh and very inportant please dont use those confusing $This>$var stuff i hate that what ever its called...thats dum. i hate it cant ever read it.
i wouldnt have a clue how to read it (proccess it) and re save it. so id need the complete code
im willing to give extra points for this as its a full coded question and most likly if not someplace else all read a big deal
thanks in advance for any help
Johnny
aka Pern
aka DragonsWorkshop