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)); ?>
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 ?>
PHP is a recursive acronym for "PHP: Hypertext Preprocessor" created by The PHP Group. PHP is a widely used server-side scripting language and the general purpose of PHP is to create dynamic Web Pages. For more information, visit the PHP website.
"PHP: Hypertext Preprocessor".
< ?php // This is an example of comment in PHP /* This is another example of comment in PHP and we can write comments in multiple lines using this method */ ? >
Create an HTML form with METHOD="post" and ACTION="login2.php". In login2.php check if the entered username and password are correct. You can get the username with $_POST['name_of_username_input']. The same goes for the password.
That sounds like the definition of encryption.
It's a php (web script) string that turns characters into "dots" in most password fields.
Google doesn't give this feature directly but there are apps such as Innovode Armor that can password protect files and documents. Alternatively to password protect a google spreadsheet you can use google scripts. Using scripting there are two options - encrypt and decrypt. You need to set a password first. Once you encrypt, all the text will be obfuscated and unreadable. To read it, you need to decrypt it again with the same password.
You can't. There is no easy way to do it and you need to know a thing or two about hacking
Why do you have to ask that... You should remember that it's bad to steal somebody's account without any valid reason/s. Also, it is impossible to decrypt a password in general unless the password is easy to guess.
This question is too broad, be more specific.
You would need to use PHP
The past tense of decrypt is decrypted.
The only two ways to recover your password are: 1) Email the admin and hope pity is taken on you 2) Hack it 1 is more preferred, however.
You would have to go through and figure out the encryption code. You can then figure out what is being said. Sometimes you just need the password that they send.
Your Question is difficult to make out But I think your asking "What is the source code in php language?" ... right? If so then Let me first explain how PHP works. PHP is server side scripting wich means all the the source code resides on the server and is never reviled to the user. Most of the time the PHP scirpt will tell the user somthing but the user can never see the original context of the php script its self. A very simply scipt in php looks like this: <?php echo 'Hello World!'; ?> This will show a page that simply says: Hello World! and nothing else. Below is a very simple secure script that requires a username and password to view the page: [PHP Code Start] <!-- Script Written by Wayne Hartmann Email: drhart4000@gmail.com Feel free to use and modify this script. --> <?php if(isset($_POST['pass'])) { $user = 'User'; //Username to access script $pass = '5f4dcc3b5aa765d61d8327deb882cf99'; // Password to access script (Use an MD5 hash to keep your password secret: // http://www.adamek.biz/md5-generator.php can be used to generate an MD5 hash. if (strtolower(addslashes($_POST['user'])) <> strtolower($user)) { die('Error invalid Username or Password.<BR>')}; if (md5(addslashes($_POST['pass'])) <> $pass) {{ die('Error invalid Username or Password.<BR>')}; //Start protected content ?> <!-- Your conent goes here! NOTE that this area is not php enabled unless you delete the ?> tag above and < ?php tag below. --> <?php //End protected content }else{ //Start Login Form ?> <HTML> <head> </head> <body> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="auth"> This script is Protected. Please authenticate to continue.&lt;?php<BR> <table width="460" border="0"> <tr> <td width="77" height="24">Username:</td> <td width="373"><input type="text" name="user" id="user2"></td> </tr> <tr> <td>Password:</td> <td><input type="password" name="pass" id="pass"></td> </tr> <tr> <td>&nbsp;</td> <td> <input type="submit" name="button" id="button" value="Run Script"> </td> </tr> </table> </form> </body> </HTML> <?php //End Login form }; ?> [PHP Code END]