Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6016399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:58:36+00:00 2026-05-23T02:58:36+00:00

This is my login script; <?php $username = $_POST[‘username’]; //kullanici adi $password = $_POST[‘password’];

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T02:58:37+00:00Added an answer on May 23, 2026 at 2:58 am

    In your php.ini (this under Windows) you should have the lines:

    ...
    ;extension=php_ming.dll
    ;extension=php_mssql.dll
    extension=php_mysql.dll
    extension=php_mysqli.dll
    ...
    

    be sure to have the mysqli commented out (remove the ; before)

    Edit: as pointed out by @datasage if you’re running a Linux distro lines will have a different naming, like:

    ;   extension=msql.so
    ;
    ; ... or with a path:
    ;
    ;   extension=/path/to/extension/msql.so
    

    If you are on a shared hosting and can’t access the php.ini, I suggest you drop them a line and ask to have it enabled.

    If you have a private server, and don’t have mysqli extension installed, follow the php manual instruction here for a guide on how to install it.

    Otherwise, you might want to use the PDO class (which is in the dafault installation since php 5.1), which has big advantages even over mysqli and it’s really useful to make safer your database.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using this php script $error = false; if(isset($_POST['login'])){ $username = preg_replace('/[^A-Za-z]/', '', $_POST['username']);
I have this script: <?php if ($_POST["username"]=="") { include($_SERVER['DOCUMENT_ROOT'] ."/login.inc.php"); } else { $username=$_POST["username"];
I am using a PHP login script that challenges user for username & password.
Can anyone see anything wrong with this login script: public function login($username, $pass, $remember)
if (isset($_POST['login'])) { $query = mysql_query(" SELECT id FROM users WHERE username = '".mysql_real_escape_string($_POST['username'])."'
Hey This is my login script, using PHP5 and MYSQLi, I just had help
For a login system in php would this be a suitable outline of how
I have written php script for user login but instead of displaying the result
I'm trying to make a simple login script that will check the inputted username
I have a login screen with username and password credentials that are validated throught

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.