Hi Guys,
Can anyone point me in the direction of where Im going wrong here:
I'm trying to write a config.php file, using the data submitted by the user on a previous screen, but I think im getting the syntax wrong somewhere:
<?php
$newvar = $_POST['newvar'];
//the file to edit bellow
$config = 'config.php';
$fh = fopen($config, 'w') or die("Can't open config file!");
$stringData = "<?php\n","//Please specify below your Responder AID Number:\n","$","listNumber = $newvar \n","\n","?>\n" );
fwrite($fh, $stringData);
fclose($fh);
?>
Am I totally miles out here...?? Any help would be great guys! 🙂