Tiene configurado un usuario y contraseña predeterminada $config_username y $config_password, como hago para quitarle eso, y poder configurar mi server en el config.php.
Lo que quiero es poder hacer un registro de usuarios ya teniendo el login. El tema es que no sé como hacerlo.
Si alguien pudiera ayudarme, le agradezco de antemano.
El código de config.php:
Código:
  
<?php
error_reporting(E_ALL ^ E_NOTICE);
session_start(); // Start Session
header('Cache-control: private'); // IE 6 FIX
// always modified 
header('Last-Modified: ' . gmdate("D, d M Y H:i:s") . ' GMT'); 
// HTTP/1.1 
header('Cache-Control: no-store, no-cache, must-revalidate'); 
header('Cache-Control: post-check=0, pre-check=0', false); 
// HTTP/1.0 
header('Pragma: no-cache');
// ---------- LOGIN INFO ---------- //
$config_username = 'demo';
$config_password = 'demo';
$cookie_name = 'siteAuth';
$cookie_time = (3600 * 24 * 30); // 30 days
if(!$_SESSION['username'])
{
include_once 'autologin.php';
}
?>
El código de do_login.php:
Código:
  
El código de autologin.php:<?php
if(empty($_POST)) exit;
include 'config.php';
// declare post fields
$post_username = trim($_POST['username']);
$post_password = trim($_POST['password']);
$post_autologin = $_POST['autologin'];
if(($post_username == $config_username) && ($post_password == $config_password))
{
$_SESSION['username'] = $config_username;
// Autologin Requested?
if($post_autologin == 1)
	{
	$password_hash = md5($config_password); // will result in a 32 characters hash
	setcookie ($cookie_name, 'usr='.$config_username.'&hash='.$password_hash, time() + $cookie_time);
	}
exit('OK');
}
else
{
echo '<div id="error_notification">The submitted login info is incorrect.</div>';
}
?>
Código:
  
 <?php
if(isSet($cookie_name))
{
	// Check if the cookie exists
if(isSet($_COOKIE[$cookie_name]))
	{
	parse_str($_COOKIE[$cookie_name]);
	// Make a verification
	if(($usr == $config_username) && ($hash == md5($config_password)))
		{
		// Register the session
		$_SESSION['username'] = $config_username;
		}
	}
}
?>
 

