Programming Help, OS System Help, Articles, Videos, Books-Web Dot Dev
Welcome, Guest
Please Login or Register.    Lost Password?
Go to bottom Post Reply Favoured: 0
TOPIC: Upgraded System
#215
matt (User)
Fresh Boarder
Posts: 12
graphgraph
User Offline Click here to see the profile of this user
Re:Upgraded System 1 Year, 10 Months ago Karma: 5  
Hi Mike,

Have you tried changing the code from

Code:

$result = mysql_query("select username, password from users, where username='$username' and password = SHA1('$password')", $handle);
to
Code:

$result = mysql_query("select username, password from users, where username='$username' and password = password('$password')", $handle);
I think this may be the issue. Regards, Matt.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#216
mdub (User)
Junior Boarder
Posts: 26
graphgraph
User Offline Click here to see the profile of this user
Re:Upgraded System 1 Year, 10 Months ago Karma: 5  
Grrr
That didn't work either.
I changed it in my auth_fns file.

Now, for testing measures I'm also setting an echo up with the The credentials you have entered are incorrect message. It is getting the correct info passed after verifying it with the database....

I'm goin' WONKY here lol
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#217
matt (User)
Fresh Boarder
Posts: 12
graphgraph
User Offline Click here to see the profile of this user
Re:Upgraded System 1 Year, 10 Months ago Karma: 5  
When you declared the password, where did you do it?
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#218
mdub (User)
Junior Boarder
Posts: 26
graphgraph
User Offline Click here to see the profile of this user
Re:Upgraded System 1 Year, 10 Months ago Karma: 5  
In my login file

Code:

<?php // Set up error reporting display ini_set('display_errors', 1); error_reporting(E_ALL); include_once('cafs_fns.php'); if ( (!isset($_REQUEST['username'])) || (!isset($_REQUEST['password'])) ) { echo 'You must enter your username and password to proceed'; exit; } $username = $_REQUEST['username']; $password = $_REQUEST['password']; if (login($username, $password)) { $_SESSION['auth_user'] = $username; header('Location: '.$_SERVER['HTTP_REFERER']); } else { echo '<br>'; echo 'The credentials you have entered are incorrect<br>'; echo 'You must enter in a valid Username & Password to continue'; exit; } ?>
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#219
matt (User)
Fresh Boarder
Posts: 12
graphgraph
User Offline Click here to see the profile of this user
Re:Upgraded System 1 Year, 10 Months ago Karma: 5  
Hi Mike,

Where did you add the user to the database?

Regards,
Matt.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#220
mdub (User)
Junior Boarder
Posts: 26
graphgraph
User Offline Click here to see the profile of this user
Re:Upgraded System 1 Year, 10 Months ago Karma: 5  
Within a *.sql file
Syntax shown in the very first post or....

Code:

insert into users(username, password, fullname, company, email, phone) values ('mwells', sha1('T3st5r'), 'Mike Wells', 'EMT', ' This e-mail address is being protected from spam bots, you need JavaScript enabled to view it ', '847.123.4567');
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop