answersLogoWhite

0

The user name is hart44home and password is rcs44

User Avatar

Wiki User

13y ago

What else can I help you with?

Continue Learning about Basic Math

How do you write login and logout code in php?

Have a session_start(); at the very top of the page in php like this: <?php session_start(); ?> Then write a login form: <form action="login.php" method = "POST"> <input type = "text" name = "username"> <input type = "password" name = "password"> <input type = "submit" value = "submit"> </form> now start a new page called login.php. Put session_start(); at the top of the page again. Now you'll have two different $_POST variables from the form that got submitted. It's $_POST['username'] and $_POST['password']. the "name" of the input is what the $_POST variable is. And it's a $_POST because of the method of the form. Now you should change the names of the $_POST just to make it easier. <?php $username = $_POST['username']; $password = $_POST['password']; ?> Now it's time to see if that username and password are in the database <?php $mysql = "SELECT COUNT(*) FROM users WHERE username = '$username' AND password = '$password'"; // Select statement to find user $query = mysql_query($mysql); // Query to see if user exists $result = mysql_query($query); // Result for query. Should be either 1 or 0. if ($result != 1) { ?> <script> alert ("That username or password doesn't exist"); </script> <meta http-equiv="refresh" content = "1; URL = index.php"> <?php // Javascript alert saying that username or password was wrong then loading the page back to the main page. } else { $_SESSION['username'] = $username; // Setting the variable for the username so now you can use $_SESSION['username'] anywhere on your website to display who is logged in. } ?> You have to put session_start(); at the top of every webpage though. Now for the logout. Create a page called logout.php. You can link to this page however you'd like. All you need for this page is: <?php session_destroy(); //destroys the current session <meta http-equiv="refresh" content = "1; URL = index.php"> //Reloads the page back to the index.php ?>


How are the simple coding of php with database?

Working with mySQL databases: <?php // Connects to the database mysql_connect(servername,username,password); // Inserts into a database mysql_query(INSERT INTO table(cat1, cat2, cat3) VALUES(one,two,three)); ?>


How do you create a login system using PHP?

Here are the stepsCreate a register form using html form elements. Keep them minimum like username, password, confirm password, email and 2-3 more fieldsOn Submit button use validation to check form input possibly using javascript or php side validationSave the details from form submission in databaseLogin will check for username/email and passwordSessions will store login detailsI am providing a few links which will serve good purpose to learn the login system. Remember to do the simple things first then move onto more complex scenarios.


What is difference between enable secret and enable password?

the difference between the Enable Secret and the Enable password and that the Enable Secret password supersedes the Enable password if it's set.


How do you block a users account if they enter a wrong password 3 times in PHP?

use session :o in your form processing php page. add 1 to a session variable. as soon as it reaches 3, you block the account with the username that he enters. I don't know what your website is like so I can't help more :x

Related Questions

What are brainpop usernames and passwords?

elmontufsd is the username and brainpop is the password


What is a free password for brainpop UK?

Heres a BrainPOP UK account you can use Username: handsworth Password: handsworth


What is a free password for brainpop jr?

Only can use during the COVID-19* period.BrainPop & BrainPop Jr.Username: InternationalNetworkLionsPassword: Lions1920* = Specifically 2019 Novel Coronavirus, also known as nCov, not to be confused with SARS Coronavirus.


Does brainpop cost money?

yes and the username and password is username is eufsd password is eufsd


How do you sign into brainpop?

To sign into BrainPOP, go to the BrainPOP website and click on the "Sign In" button. Enter your username and password or use a single sign-on option if available. If you don't have an account, you can create one by clicking on the "Sign Up" button.


What is the password for Brian pop Jr?

I do not know the password For Brian Pop Jr.com i just know my username and iam not ganna tell you it


What is your dragonfable username and password?

username=dbalcs999 password=javon999


Is they any websites where you can watch free videos?

Yes there is.... you can try YouTube or even for younger kids, brainpop or brainpop jr


Rich Millsberry username and password?

USERNAME futbal1 PASSWORD slovanUSERNAME jj_monkeykid PASSWORD jellybeanUSERNAME ano13nie USERNAME anoanoanoUSERNAME holi12 USERNAME pandas


How to log in to ftp?

If you are in CMD type the following: user [your username] pass [your password] Replace [your username] with your username and [your password] with your password.


What is your username and password for bloggercom?

username: itsfreethisistheusername password: getyourownaccount


Is the username or password shown on youtube?

just the username. not the password