This is my login script;
<?php
$username = $_POST['username']; //kullanici adi
$password = $_POST['password']; //parola
$msg ='';
if(isset($username, $password)) {
ob_start();
include('ayar.php');
// güvenlik ama?li sql injection ?nlemek i?in sinirlama koy
$dbC = mysqli_connect($vthost, $vtkullanici, $vtsifre, $vtadi)
or die('Veritabanina baglanilamadi');
$myusername = stripslashes($username);
$mypassword = stripslashes($password);
$myusername = mysqli_real_escape_string($dbC, $myusername);
$mypassword = mysqli_real_escape_string($dbC, $mypassword);
$sql="SELECT * FROM login_admin WHERE user_name='$myusername' and user_pass=SHA('$mypassword')";//SHA ??z
$result=mysqli_query($dbC, $sql);
// kayit kontrol et
$count=mysqli_num_rows($result);
// kayit eslemesi kontrol et
if($count==1){
// esmeleme varsa oturum a? ve y?nlendir
session_register("admin");
session_register("password");
$_SESSION['name']= $myusername;
header("location:raporla.php");
}
else {
$msg = "Yanlis kullanici adi yada parola";
header("location:index.php?msg=$msg");
}
ob_end_flush();
}
else {
header("location:index.php?msg=Kullanici adi yada parola girmediniz");
}
?>
in ayar.php
I have host, username etc. There is no problem up there. But the problem is that it's working great on local and any other host but not on this one. Here is the what server error log says.
[11-Jun-2011 02:01:26] PHP Fatal error: Call to undefined function mysqli_connect() in /home/bankalar/public_html/rapor/giris.php on line 9
mysqli_connect()
. I've searched for this module on my php conf. But there's no such one. Any idea?