Do I need to fill in the information in PHP scripts to query database for
Login and Registration?
I am following the tutorial here:
http://www.androidhive.info/2012/01/android-login-and-registration-with-php-mysql-and-sqlite/
When creating the php scripts, do I need to fill in coding such as: (In
DB_Connect:
<?php
class DB_Connect {
// constructor
function __construct() {
}
// destructor
function __destruct() {
// $this->close();
}
// Connecting to database
public function connect() {
require_once 'config.php';
// connecting to mysql
$con = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
// selecting database
mysql_select_db(DB_DATABASE);
// return database handler
return $con;
}
// Closing database connection
public function close() {
mysql_close();
}
}
?>
The DB_Host, the DB_User, DB_Password, and the DB_Database to make it
connect? Or do I just leave the coding the way it is? Thanks!
No comments:
Post a Comment