I need to create a php file based on what i get from user input(form)? Tried this but aint working, I have read that if i use the parameter 'a' then it will create one if there isn’t any.... any help would be appreciated...
require_once('../../../includes/config.inc.php');
if(isset($_POST['submit_menu']))
{
$title_name = strtolower($_POST['title_name']);
$language = strtolower($_POST['language']);
$language_name = "INSERT INTO menu_bar (title, lang_name) VALUES('$title_name', '$language')";
$query_language = mysql_query($language_name);
$dir = '../multiling/content/'.$language."/";
$file = $title_name.'.php';
$path = $dir.$file;
$file_handle = fopen($path,"a");
fclose($file_handle);
//echo "<meta http-equiv=\"refresh\" content=\"0;URL=index.php?select=1\">";
}