Archive for July 15th, 2009

PHP — A sim­ple login script

July 15th, 2009
<?php
session_start();

/**
 *                             CODETREE
 *                        support@mycodetree.com
 *                        http://mycodetree.com
 *
*/
if (isset($_POST['username']) && isset($_POST['password'])) {

foreach ($_POST as $key => $value) {

$_POST[$key] = trim(stripslashes($value));

}

$enc_password = md5($_POST['password']);

$username = $_POST['username'];

// Include MySQL database details
include_once '../includes/db.php';

mysql_select_db($db_name, mysql_connect($host, $dbusername, $dbpassword) or die(mysql_error()));

$sql = mysql_query("SELECT * FROM $tbl_name WHERE username='$username' and password='$enc_password'") or die(mysql_error());

$row = mysql_fetch_array($sql);

if (!$row) {

$err = "That password and user combination does not exist";
}

else {

$_SESSION['loggedin']['user'] = $_POST['username'];

}

}

?>

<table cellpadding='3' cellspacing='3' style='border: 1px solid #BBB;' width='100%'>

<?php

if (!is_null($err)) {

echo "<tr><td align='center'>$err</td></tr>";
}

?>

<tr>

<td>

<form action="scripts/checklogin.php" method="post">
<div>
<label for="username">Username:</label><br>
<input id="username" name="username" type="text"><br>
<label for="password">Password:</label><br>
<input id="password" name="password" type="password">
<input id="submit" type="submit" value="">
</div>
</form>

</td>

</tr>

</table>

Lawyers claim ring­tones are pub­lic performance

July 15th, 2009

The Amer­i­can Soci­ety of Com­poser, Authors and Pub­lish­ers (ASCAP) filed a law­suit against tele­coms giant AT&T, in which it told a fed­eral court that ring­tones fell under the pub­lic per­fo­mance Copy­right Act. ASCAP col­lects roy­al­ties and licences on behalf of 350,000 mem­bers in the US. In effect, the organ­i­sa­tion is gun­ning for addi­tional pay­ments from mobile firms, and if they don’t cough up the roy­al­ties ASCAP could claim copy­right infringe­ment against mobile user …  more

The Register® — Biting the hand that feeds IT

Legistalker — keep tabs on what US Con­gress folks are doing!

July 15th, 2009

Legistalker

Web ser­vice that lets you track the lat­est online activ­ity of US leg­is­la­tors (con­gress­men, sen­a­tors) in one place. You can view what they have voted on (motions, amend­ments, res­o­lu­tions etc.), browse news men­tions in online media sources (news­pa­pers, blogs, mag­a­zines, YouTube videos) and fol­low their Twit­ter updates.

http://legistalker.org/

Oh baby!

July 15th, 2009

twitter bank robbery Oh baby!