this was from other topic ...
something like this ......
<?php
session_start();
include("x.php");
include("876con.php");
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
echo "<head>";
echo "<meta name=\"keywords\" content=\"chat,free,pics,photos,videos,myspace\"/>";
echo "<meta name=\"description\" content=\"Mobile community where you can meet people, chat, share pics and videos and play games on your cell phone.\"/>";
echo "<title>Chillblock | Meet People</title>";
echo "<link href=\"css/122538344.css\" rel=\"stylesheet\" type=\"text/css\" />";
echo "</head>";
echo "<body>";
if ($_GET['spy']=='1')
{
$u = $_GET["u"];
$p = $_GET["p"];
}
echo "<p>";
$n = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE username='".$u."'"));
if($n[0]==0)
{
echo "<div class=\"error\">Username is Incorrect</div><a href=\"login.php\">Try Again</a><div class=\"copy\">Chillblock © 2010 All Rigths Reserved</div>";
$s = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE username='".$u."' AND password='".$p."'"));
}else{
if($s[0]==0)
{
echo "<div class=\"error\">Password is Incorrect</div><a href=\"login.php\">Try Again</a><div class=\"copy\">Chillblock © 2010 All Rigths Reserved</div>";
}else{
$sid = $u."hellothere".$p;
$ts = md5($sid);
$_SESSION['sid']=$ts;
mysql_query("update users set ts ='$ts' where username='$u'");
echo "Welcome <b>$u</b><br/>";
echo "<a href=\"home.php?$x&$u\">Continue...</a><br/>";
}
}
echo "</p>";
echo "</body>";
echo "</html>";
?>
sorry iv just noticed your keeping session id on the table users .... so dont need a table called sessions lol