Hello there,
I have a code like this
$db_username = "student";
$db_password = "itk215";
$db_name = "itk215";
$mysql_link = mysql_connect( "localhost", "$db_username", "$db_password") or die( "Unable to connect to database server");
@mysql_select_db( "$db_name") or die( "Unable to select database");
$res_pass = md5($passwrd);
$result = mysql_query("SELECT COUNT(*) FROM ktl WHERE user_name='$user_name' AND passwrd='$res_pass'");
$result_count = mysql_result($result,0,0);
From line 1 till line 4, I want to have this information in some other php file so that I won't need to write this again and again. And I want this .php file to be included in other scripts. Can somebody please tell me how to do so?
Regards,
Taz