Skip to content

Instantly share code, notes, and snippets.

<?php
//A script for testing submitted login details against the database.
$unknown_email = false;
$wrong_password = false;
//Check for registration.
if($_POST['login'])
{
//Data has been submitted, now its time to save it.
<form action="index.php" method="post" enctype="application/x-www-form-urlencoded">
<h3>Log In</h3>
<b>Email Address</b> <br />
<input type='text' name='loginEmail' />
<?php
if($unknown_email)
{
echo "Unknown email address.";
}
?>
find . -type f -name '*.php' -exec awk 'END {print NR}' '{}' + 2>/dev/null | awk '{ total+=$1 }END{print total}'
<html>
<head>
<title>Ajax JavaScript Loader</title>
<script type='text/javascript' src='jquery-1.3.2.min.js'></script>
<script type='text/javascript'>
$.ajax({type: "GET",
url: "1_loader.js",
success: function(responseText)
{
function internalFunction()
{
alert("Success.");
}
<html>
<head>
<title>Ajax JavaScript Includer</title>
<script type='text/javascript' src='jquery-1.3.2.min.js'></script>
<script type='text/javascript'>
//The list of loaded resources.
var loaded = new Array();
function outputFoo()
{
alert(foo);
}
var foo = 'test';
function setFoo(bar)
{
foo=bar;
}
<html>
<head>
<title>Ajax JavaScript Loader</title>
<script type='text/javascript' src='jquery-1.3.2.min.js'></script>
<script type='text/javascript'>
//Sadly internalFunction can not be accessed here, only with the scope of the
//success function in which it was created using eval();
function nonScope()
{
<html>
<head>
<title>Ajax JavaScript Loader</title>
<script type='text/javascript' src='jquery-1.3.2.min.js'></script>
<script type='text/javascript'>
//Sadly internalFunction can not be accessed here, only with the scope of the
//success function in which it was created using eval();
function nonScope()
{