$username = $_POST['un'];
$password = $_POST['pw'];
$f = fopen("config.php", "w+");
$read = fread($f, 3013004);
$replaced = preg_replace('$config[\'USERNAME\'] = "{1}";', $username, $read);
I've read the regex documentation however it provides little help for PREG_REPLACE in this situation. Can someone either guide me in a direction on how I should properly use this for my situation or attempt to explain what I should do for it?
Thanks,
peyton

New Topic/Question
Reply



MultiQuote



|