I have a system in which visitors submit their reviews to my website. Using a form, their ratings on a scale of one to ten are inserted into a PHP file, which might look like this:
<?PHP
$sound="10";
$graphics="8";
$overall="8";
?>
I then use a different page to require() the file containing their review. However, I wish to automate this by making the form script write the coding above into a file and CHMOD to 0755. I know how to CHMOD existing files and create files and everything, but how do I get $sound or any other variable into a document without the server parsing it? For instance, it parses the $sound, $graphics, and $overall variables so that the file to be required looks like this:
<?PHP
="10";
="8";
="8";
I know this is possible because a message board script called PBLang does it many times. (For the record, the problem is not with CHMOD. A lot of people seem to think it is...)