Code: Select all
config.php
<?
define('BOX_X', 22);
define('BOX_Y', 12);
define('BOX_WIDTH', 114);
define('BOX_HEIGHT', 27);
define('ENVELOPE_WIDTH', 240);
define('DESIRED_MARGIN', 13);
?>I have a form where a user can give new integer values for the items defined above.
e.g. after posting the form, I have something like:
Code: Select all
Array
(
[BOX_X] => 35
[BOX_Y] => 15
[BOX_WIDTH] => 127
[BOX_HEIGHT] => 30
[ENVELOPE_WIDTH] => 200
[DESIRED_MARGIN] => 10
[submit] => Submit Changes
)I'm figuring it's going to be some king of ereg_replace type thing but I'm really horrible at regex, and also I wasnt' sure what the best way is to read through a file line by line, if I should be using fgets() or just file().
Thanks.