Skip to content

Commit

Permalink
index.php Final
Browse files Browse the repository at this point in the history
  • Loading branch information
anuprai11 committed Apr 12, 2015
1 parent 31e1685 commit 32a9a6f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions php_sandbox/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,11 @@ function generateRandomString() {
{
$error_message = "Username does not exixts. Please sign up!";
}

else{

$rw = mysql_fetch_object($set);
if($rw->temp_pwd == $password || $rw->pwd == $password)
if($rw->temp_pwd == $password)
{
$_SESSION['username'] = $username;
if(is_prof($_SESSION['username']))
Expand All @@ -99,6 +100,12 @@ function generateRandomString() {
exit;

}
else if($rw->pwd == $password)
{
$_SESSION['username'] = $username;
header("Location: http://localhost/php_sandbox/homepage.php"); /* Redirect browser */
exit;
}
else{
$error_message = "Username/Password Incorrect. Please try again";
}
Expand Down Expand Up @@ -273,4 +280,4 @@ function generateRandomString() {
</body>


</html>
</html>

0 comments on commit 32a9a6f

Please sign in to comment.