Jake
2012-04-18 18:47:44 UTC
heres the code for page to connect to after login.. (ik i has the php code correct on index :p)
session_start();
if(isset($_SESSION['username']) && isset(['password'])){
include("config/external.php");
$connection = mysql_connect($db_host, $db_username, $db_password);
mysql_select_db($db_name, $connection);
$doCheck = mysql_query("members");
if(mysql_num_rows != 1){
header("location: index.html");
}
}else{
header("location: index.html");
}
here is my database... and if someone could introduce me as to how i can hash that would be great!
CREATE TABLE `members` (
`id` int(4) NOT NULL auto_increment,
`username` varchar(65) NOT NULL default '',
`password` varchar(65) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=2 ;
--
-- Dumping data for table `members`
--
INSERT INTO `members` VALUES (1, '**** *******', *********');
INSERT INTO`members` VALUES (2, '***** ******', '***********');
Call this file database.php if you will... is .php the correct extension? or does it need to be some sql extension?