Click here to Skip to main content
15,886,519 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
AnswerRe: getting information from the url Pin
Luc Pattyn24-Apr-10 15:32
sitebuilderLuc Pattyn24-Apr-10 15:32 
Questioninstalling Zorine OS on virtualbox?? Pin
AmbiguousName24-Apr-10 5:10
AmbiguousName24-Apr-10 5:10 
AnswerRe: installing Zorine OS on virtualbox?? Pin
LloydA11124-Apr-10 5:53
LloydA11124-Apr-10 5:53 
Questionphp website with parameters Pin
MacIntyre22-Apr-10 13:03
MacIntyre22-Apr-10 13:03 
AnswerRe: php website with parameters Pin
Dr.Walt Fair, PE23-Apr-10 16:25
professionalDr.Walt Fair, PE23-Apr-10 16:25 
GeneralRe: php website with parameters Pin
MacIntyre23-Apr-10 19:26
MacIntyre23-Apr-10 19:26 
GeneralRe: php website with parameters Pin
Dr.Walt Fair, PE24-Apr-10 6:29
professionalDr.Walt Fair, PE24-Apr-10 6:29 
QuestionPossible md5 encrypting error Pin
SRJ9221-Apr-10 11:43
SRJ9221-Apr-10 11:43 
hello, i am hoping someone will be able to help me with this, i have a basic login form using md5 encryption....

Login.php (the form)
<?php echo '<div id="errors">'.$err.'</div>'; ?><br/>
<table><tr><td>
<form method="post" action="login_go.php">Username:
</td><td>
<input typ="text" name="user">
</td></tr><tr><td>
Password:
</td><td>
<input type="password" name="passcode">
</td></tr><tr><td>
<input type="submit" value="Log In"></td></tr></table><br/>


login_go.php (the processing)
<?php
session_start();
Include("connect.php");
		$username = ($_POST['user']);
		$password = md5($_POST['passcode']); 
		$q = mysql_query("SELECT * FROM users WHERE user = '$username' AND pass = '$password'") or die (mysql_error()); 
		$r = mysql_num_rows($q);

		if ($r == 1) {
			$_SESSION['logged'] = TRUE;
			$_SESSION['user'] = $username;
			$_SESSION['email'] = $email;
			$_SESSION['date'] = $joined;
			header("Location: members.php");
			exit(); // Stops the rest of the script.
		} else { 
			 $err.='Incorrect username/password!'; 
			Include("login.php");
		}
?>

On my database, the password is encrypted correctly but when i come to login i only need to enter the user and i gain access, and when i put a password into it, i then get an error .... what have i done wrong ? ?

Thanks
Steve
AnswerRe: Possible md5 encrypting error Pin
Graham Breach21-Apr-10 22:41
Graham Breach21-Apr-10 22:41 
GeneralRe: Possible md5 encrypting error [modified] Pin
SRJ9223-Apr-10 11:38
SRJ9223-Apr-10 11:38 
GeneralRe: Possible md5 encrypting error Pin
SRJ9223-Apr-10 12:26
SRJ9223-Apr-10 12:26 
QuestionHow to add new row to gridview at first? Pin
lamiaa_12316-Apr-10 5:54
lamiaa_12316-Apr-10 5:54 
AnswerRe: How to add new row to gridview at first? Pin
HimanshuJoshi18-Apr-10 19:49
HimanshuJoshi18-Apr-10 19:49 
Questionwindow.open The Pop window can be resize as per the content of the page Pin
Sandesh M Patil14-Apr-10 4:16
Sandesh M Patil14-Apr-10 4:16 
AnswerRe: window.open The Pop window can be resize as per the content of the page Pin
Dr.Walt Fair, PE23-Apr-10 16:22
professionalDr.Walt Fair, PE23-Apr-10 16:22 
QuestionPositioning errors :S Pin
SRJ9213-Apr-10 11:48
SRJ9213-Apr-10 11:48 
AnswerRe: Positioning errors :S Pin
enhzflep19-Apr-10 20:30
enhzflep19-Apr-10 20:30 
AnswerRe: Positioning errors :S Pin
xTraCD21-Apr-10 6:16
xTraCD21-Apr-10 6:16 
GeneralRe: Positioning errors :S Pin
SRJ9221-Apr-10 11:37
SRJ9221-Apr-10 11:37 
Questionnot sending other email account in mail() Pin
jhyn12-Apr-10 17:44
jhyn12-Apr-10 17:44 
AnswerRe: not sending other email account in mail() Pin
Michel Godfroid19-Apr-10 21:46
Michel Godfroid19-Apr-10 21:46 
GeneralRe: not sending other email account in mail() Pin
jhyn20-Apr-10 15:40
jhyn20-Apr-10 15:40 
Questionhow to read .zip file in php Pin
udch12-Apr-10 4:03
udch12-Apr-10 4:03 
AnswerRe: how to read .zip file in php Pin
Graham Breach12-Apr-10 4:20
Graham Breach12-Apr-10 4:20 
GeneralRe: how to read .zip file in php Pin
udch12-Apr-10 5:12
udch12-Apr-10 5:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.