Folders with same language and design but different database query problem

dear everyone…
i am developing a website that contains 4 folders (gl,gb,kz,eg) each folder related to different country and all the website data are in English language but the difference is in the MySQL query of database to get data according to the country

1) www.example.com/gl/   (Global English version)
2) www.example.com/gb/ (UK version)
3) www.example.com/kz/  (Kazakh version)
4) www.example.com/eg/ (Egyptian version)

i don’t want to add my files to the root of each folder to avoid the headache when changing css or anything in the website…

i dont want to change everything in 4 folders, i want to change only one file and those changes to affect in each folder, i tried to put my files in the root of my project and in each folder i made include to get the data

for example : in gl:




$select_query1 = "SELECT * FROM databaseo where page='about' and lango='gl'";
	//print "select_query1: " . $select_query1 . "<br>";
	$res_query1 = mysql_query($select_query1)
	or die ("table error1: " . mysql_error());
$res_rows1 = mysql_num_rows($res_query1);
//echo $res_rows1;
//$tr_res_query1 = mysql_fetch_array($res_query1);

//or

	while ($tr_res_query1 = mysql_fetch_array($res_query1))
	{
	echo 'result here<br>';
	
	}
include('../about.php'); 	

and in gb


$select_query1 = "SELECT * FROM databaseo where page='about' and lango='gb'";
	//print "select_query1: " . $select_query1 . "<br>";
	$res_query1 = mysql_query($select_query1)
	or die ("table error1: " . mysql_error());
$res_rows1 = mysql_num_rows($res_query1);
//echo $res_rows1;
//$tr_res_query1 = mysql_fetch_array($res_query1);

//or

	while ($tr_res_query1 = mysql_fetch_array($res_query1))
	{
	echo 'result here<br>';
	
	}
include('../about.php'); 	

etc…

but it did not work for me because of difference in paths for *.js files and for folders… any idea???

I’m not sure why you would duplicate this page 4 times over rather than putting it in the root with a selector for language, but… to each their own.

You’ve given us about 50% of the information, i believe…
“but it did not work for me because of difference in paths for *.js files and for folders”
What JS files? What folders? You havent shown us any references to those. Are those references inside “about.php”? What do they look like?