Username or Email
Password
Remember me
Sign in
Sign up
Add Paste
Add Collection
You are not allowed to edit this paste! A fork will be created instead.
C/C++
CSS
HTML
Markdown
PHP
Python
Text
ABAP
ActionScript
ADA
Apache Conf
AsciiDoc
Assembly x86
AutoHotKey
BatchFile
BBCode
C9Search
Clojure
Cobol
CoffeeScript
ColdFusion
C#
Curly
D
Dart
Diff
Dot
Erlang
EJS
Forth
FreeMarker
Glsl
Go
Groovy
HAML
Handlebars
Haskell
haXe
HTML (Ruby)
INI
Jack
Jade
Java
JavaScript
JSON
JSONiq
JSP
JSX
Julia
LaTeX
LESS
Liquid
Lisp
LiveScript
LogiQL
LSL
Lua
LuaPage
Lucene
Makefile
MATLAB
MEL
MySQL
MUSHCode
Nix
Objective-C
OCaml
Pascal
Perl
pgSQL
Powershell
Prolog
Properties
Protobuf
R
RDoc
RHTML
Ruby
Rust
SASS
SCAD
Scala
Scheme
SCSS
SH
SJS
Space
snippets
Soy Template
SQL
Stylus
SVG
Tcl
Tex
Textile
Toml
Twig
Typescript
VBScript
Velocity
Verilog
XML
XQuery
YAML
else if($result == 2){ die(\'Incorrect password, please try again.\'); } /* Username and password correct, register session variables */ $_POST[\'user\'] = stripslashes($_POST[\'user\']); $_SESSION[\'username\'] = $_POST[\'user\']; $_SESSION[\'password\'] = $md5pass; /** * This is the cool part: the user has requested that we remember that * he\'s logged in, so we set two cookies. One to hold his username, * and one to hold his md5 encrypted password. We set them both to * expire in 100 days. Now, next time he comes to our site, we will * log him in automatically. */ if(isset($_POST[\'remember\'])){ setcookie(\"cookname\", $_SESSION[\'username\'], time()+60*60*24*100, \"/\"); setcookie(\"cookpass\", $_SESSION[\'password\'], time()+60*60*24*100, \"/\"); } /* Quick self-redirect to avoid resending data on refresh */ echo \"
\"; return; } /* Sets the value of the logged_in variable, which can be used in your code */ $logged_in = checkLogin();
Private