Here is what i have so far.
I create a user, and then i click on a button to create a dir (mkdir) and it makes a folder named what ever the get_var tells it.
It then takes me to a page where i can click a button and it copys a set of files into this new folder.
All these files it copies will never change, except 1.
There is a config file that tells the other files in the folder (index.php, help.php) what to do. It can only get that information if it querys the database and finds all of the required info for that ID number.
The id number is always going to be different in each config file, but the rest of the information will remain there.
$id = 55;
I need to write the result of this into a php file i have in the folder.
In the php file its formatted like so…<?php $id = 5; ?>
My question being, how can i write that value to my config file.
I tried using this …
$query = mysql_query(“SELECT id FROM user_info WHERE city = '”.$_POST[“city”]."’");
$result = mysql_fetch_array($query);
$id = $result[“id”];
?><?php $File = "config.php"; $Handle = fopen($File, 'a'); $Data = " $city_id = $id; "; fwrite($Handle, $Data); print "Data Written"; fclose($Handle); ?>
That didnt work because first off it didnt like the $$ and second when it saw "; it thought to end the Data string.
I changed the $ to the ascii for it but then it wouldnt bring in my ID number from the query.
So to sum it all up, i need to write the value to a php file in php format…
If you can be of any help, please let me know !