hi
all i need to learn what does this mean (this style of writing)
may be is there another variant to write the code
<?
exit;}
if($_GET['step'] == "2"){
$name_db=$_POST['name_db'];
$host_db=$_POST['host_db'];
$user_db=$_POST['user_db'];
$password_db=$_POST['password_db'];
$connect=mysql_connect($host_db,$user_db,$password_db);
mysql_query("create database $name_db");
$connect=mysql_pconnect($host_db,$user_db,$password_db);
mysql_select_db($name_db,$connect);
$sql1 = "create table `config` (
`id` int(1) NOT NULL default '0',
`admin` varchar(25) NOT NULL default '',
`password` varchar(100) NOT NULL default '',
`script_dir` varchar(10) NOT NULL default '',
`am_news` int(2) NOT NULL default '0',
`PreLengthC` int(5) NOT NULL default '0',
`tab_width` varchar(5) NOT NULL default '',
`p_time` int(1) NOT NULL default '0',
`p_date` int(1) NOT NULL default '0',
`img_dir` varchar(10) NOT NULL default '',
`img_height` int(5) NOT NULL default '0',
`c_top` int(1) NOT NULL default '0',
`c_bottom` int(1) NOT NULL default '0',
PRIMARY KEY (`id`)
)";
mysql_query("$sql1");
$sql2 = "create table `news` (
`news_id` int(11) NOT NULL auto_increment,
`news_stamp` int(11) NOT NULL default '0',
`news_time` varchar(5) NOT NULL default '00:00',
`news_date` date NOT NULL default '0000-00-00',
`news_title` text NOT NULL,
`news_content` text NOT NULL,
`news_img` char(1) default 'n',
`news_exp` varchar(5) NOT NULL default '.jpg',
PRIMARY KEY (`news_id`)
)";
mysql_query("$sql2");
$config="<?\r\n".
"$"."name_db = \"".$name_db."\"; // name of Database \r\n". [B]here i dont understand of writing why ?[/B]
"$"."host_db = \"".$host_db."\"; // host r\n".here i dont understand of writing why ?
"$"."user_db = \"".$user_db."\"; // login \r\n".here i dont understand of writing why ?
"$"."password_db = \"".$password_db."\"; // password db \r\n".[COLOR]="Red"][B]here i dont understand of writing why ?[/B]
"$"."table_news = \"news\";\r\n\r\n".[B]here i dont understand of writing why ?[/B]
"$"."connect = mysql_connect (\$host_db, \$user_db, \$password_db);\r\n".[B]here i dont understand of writing why ?[/B]
"mysql_select_db (\$name_db, \$connect);\r\n".[B]here i dont understand of writing why ?[/B]
"$"."result = mysql_query(\"select * from `config` where (id = '-1')\","."$"."connect);\r\n".
"$"."row=mysql_fetch_array("."$"."result);\r\n".
"$"."admin = \$row['admin'];\r\n".here i dont understand of writing why ?
"$"."password = \$row['password'];\r\n". and so on
"$"."script_dir = \$row['script_dir'];\r\n".
"$"."am_news = \$row['am_news'];\r\n".
"$"."PreLengthC = \$row['PreLengthC'];\r\n".
"$"."tab_width = \$row['tab_width'];\r\n".
"$"."p_time = \$row['p_time'];\r\n".
"$"."p_date = \$row['p_date'];\r\n".
"$"."img_dir = \$row['img_dir'];\r\n".
"$"."img_height = \$row['img_height'];\r\n".
"$"."c_top = \$row['c_top'];\r\n".
"$"."c_bottom = \$row['c_bottom'];\r\n?>";
$fp=fopen("cpanel/lib.php","w");
flock ($fp,LOCK_EX);
fputs($fp,$config);
fflush ($fp);
flock ($fp,LOCK_UN);
fclose($fp);
@chmod("cpanel/lib.php", 0755);
?>
Thanks beforehands