Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
<?php // initialize the buffer. ob_start(); if (isset($_POST)) { $username = $_GET['username']; // ?username= $password = $_GET['password']; // &password= [hashed, of course.] $hardware_token = $_GET['token']; // &token= for hardware login, etc. $result = mysql_query("SELECT * FROM `accounts` WHERE username='".$username."' AND password='".$password."'"); $row = mysql_fetch_array($result); if ($row['username'] && $row['password']) { echo "AUTH OK"; } else { echo "AUTH BAD"; } } ?>
This paste will be private.
From the Design Piracy series on my blog: