15,890,282 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by gavin_daCEO (Top 35 by date)
gavin_daCEO
23-Jan-21 7:13am
View
i will do that. God bless
gavin_daCEO
23-Jan-21 3:13am
View
i actually had a developer who was helping me with the project but then he dropped me since at that time i knew nothing about programming , i just had to learn. this one is just for demonstration purpose for the client. the real site i will find a developer who specializes with jsp . Thanks but i am also learning jsp. PHP is crap
gavin_daCEO
23-Jan-21 2:49am
View
i got it off the internet so i am still learning
gavin_daCEO
23-Jan-21 2:47am
View
no i did not do it
gavin_daCEO
21-Oct-20 5:23am
View
this is the complete code for the login page
if($_SERVER['REQUEST_METHOD'] == 'POST'){
$username = trim($_POST['username']);
try{
$Query = "SELECT * password FROM users WHERE username = :username";
$statement = $conn->prepare($Query);
$statement->bindValue(':username', $username);
$statement->execute();
$user = $statement->fetch(PDO::FETCH_ASSOC);
$RowCount = $statement->rowCount();
} catch (PDOerrorInfo $e){
die('QuerySCD Error '.$e->getMessage());
}
if( $RowCount == 0 ){
$_SESSION['message'] = "error!";
$message = "Invalid login credentials";
} else{ // User exists
if( password_verify($_POST['password'], $user['password'])){
$_SESSION['username'] = $user['username'];
$_SESSION['active'] = $user['active'];
$_SESSION['logged_in'] = true;
header("location: studentportal.php?onions=no&pickles=yes");
} else {
$_SESSION['message'] = "error!";
//header("location: error-login.php");
$message = "Invalid login credentials";
}
}
}
$conn = NULL;
gavin_daCEO
21-Oct-20 5:20am
View
i was able to login with invalid login credentials but then after deleting the asterik and the cache on my computer it works, the only problem that just started is that even when i provide valid login credentials it does not work. Let me check my codes if i am missing something and also if you have any suggestion please suggest them
gavin_daCEO
21-Oct-20 4:37am
View
i deleted the asterisk but the error still persists
gavin_daCEO
21-Oct-20 4:34am
View
To tell the code and made some adjustments so the asterisk was there and i did not alter the query statement.
gavin_daCEO
31-Aug-20 16:09pm
View
thanks so much
gavin_daCEO
31-Aug-20 14:50pm
View
i am only failing on the session for the username or is there anything else ? i am working it out but it still gives me problems
gavin_daCEO
31-Aug-20 12:44pm
View
i will try it out thanks for the advice neh
gavin_daCEO
31-Aug-20 9:06am
View
i wanted the second page to use a session from the first page and not start a session on the second page. will it work the way i am doing it
gavin_daCEO
31-Aug-20 8:48am
View
thanks for showing me the light
gavin_daCEO
31-Aug-20 8:46am
View
it is not there so i am supposed to add it,i also implemented crsf so i also need to add that on the session
gavin_daCEO
31-Aug-20 8:35am
View
If anyone can show me where I am failing please so I can correct my mistake
gavin_daCEO
26-Aug-20 20:28pm
View
thank you i will do that
gavin_daCEO
26-Aug-20 12:49pm
View
ok thanks a lot
gavin_daCEO
26-Aug-20 7:10am
View
I am thinking that I am setting the session to true for when the user logs in. can you assist me f you have any know-how, please
gavin_daCEO
26-May-20 8:15am
View
thanks
gavin_daCEO
26-May-20 7:32am
View
i got a bunch of lines on how to do it on the internet and they do not work. the latest is this one #remove php file extension-e.g. https://example.com/file.php will become https://example.com/file
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php [NC,L]
gavin_daCEO
26-May-20 7:09am
View
i am trying to remove the .php extension
gavin_daCEO
26-May-20 7:01am
View
i did that however it creates an error on the server
gavin_daCEO
26-May-20 4:49am
View
thanks i will do that
gavin_daCEO
9-Apr-20 6:48am
View
I hash my passwords actually maybe it is the query that i did not build correctly . but i do hash them
gavin_daCEO
7-Apr-20 9:48am
View
Thank you so much once i have built a working query and it works i will let you know. thanks again
gavin_daCEO
7-Apr-20 9:09am
View
Thank you, i am trying to work out how i can build the query so it can work. No i do not store the passwords in plain texts
gavin_daCEO
5-Feb-20 6:38am
View
thank you. i will do that
gavin_daCEO
5-Feb-20 6:38am
View
thank you. i will do that
gavin_daCEO
4-Feb-20 8:42am
View
thank you for showing me my mistake
gavin_daCEO
4-Feb-20 8:31am
View
i will check it thank you very much
gavin_daCEO
4-Feb-20 8:16am
View
i did try it but it does not hash the password
gavin_daCEO
30-Jan-20 8:21am
View
it works thank you very much may god bless you and your dream thanks a lot
gavin_daCEO
30-Jan-20 8:02am
View
thank you, i do not mean to be nag but could you please show me how do i do this Bind "username" to SELECT query
gavin_daCEO
30-Jan-20 7:47am
View
are you saying i must not select the password or i must just select the way you did. thanks in advance. i am new to php
gavin_daCEO
30-Jan-20 7:25am
View
yes when I try to get verify a password that is stored in the database it does not work. I do not know what am I doing wrong. it does hash but verify gives me a problem
Show More