Jump to content

Passwords in MySQL


otuatail

Recommended Posts

I can't supply code for inputing data as this is currently done manual using MySQLAdmin.

Here though is the database structure and the retreaval code

 

CREATE TABLE IF NOT EXISTS `Accounts` (
  `ID` int(11) NOT NULL  auto_increment,
  `F_Name` varchar(20) NOT NULL default '',
  `L_Name` varchar(20) NOT NULL default '',  
  `N_Name` varchar(10) NOT NULL default '',  
  `Email` varchar(50) NOT NULL default '',
  `USR` varchar(15) NOT NULL default '',
  `PWD` varchar(15) NOT NULL default '',
  `Date` date default NULL,
  `Hidden` varchar(1) NOT NULL default 'N',
  PRIMARY KEY  (`id`)
) TYPE=MyISAM;

-----

$PWD = $_POST['pwd'];
$USR = $_POST['usr'];
$sql = "SELECT * FROM Accounts WHERE USR = '" . $USR . "' AND PWD = '" . $PWD . "'";
// echo $sql;
$qAccess = mysql_query($sql) or die(mysql_error());
$Rows = mysql_num_rows($qAccess);

Link to comment
https://forums.phpfreaks.com/topic/37040-passwords-in-mysql/#findComment-176870
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.