Registration & Login & Consult [Http/Mysql]
Publicado: 21 Jul 2011 18:57
salam & hello
this exemple for login and registration and consultation (view rapport for admin only
)
Pictures :
login :

view rapport !

registre

what you need :
code source :
view.php
test.php
this exemple for login and registration and consultation (view rapport for admin only

Pictures :
login :

view rapport !

registre

what you need :
- StatusBar plugin
host or easy php
base d [ usera, passa]
code source :
view.php
<?php
$connect = mysql_connect("localhost", "root", "") or trigger_error(mysql_error(),E_USER_ERROR);
mysql_select_db("test",$connect) or die(mysql_error());
$result=@mysql_query("SELECT passa FROM regsite WHERE usera='".mysql_real_escape_string($_POST['user'])."' AND passa='".mysql_real_escape_string($_POST['pass'])."'");
if ($reg=mysql_fetch_array($result))
{
$res = @mysql_query("SELECT usera,passa FROM regsite ORDER BY usera");
echo '<tr>
<td colspan="4" height="40" style="color: rgb(136, 200, 20);"><b>Table membres</b></p>
</td>
</tr>';
echo '<table border="1" cellspacing="0" cellpadding="0" width="40%" style="border: 0.5px;"> <tr>
<th>Username
</th><th>Password
</th>';
while($values = mysql_fetch_array($res)){
echo '<tr><td>' .$values['usera'].'</td><td>' .$values['passa'].'</td></tr>';
}
echo '</table>';
}
else
{
echo "Username or Password incorect ! ";
}
?>
test.php
<?php
$connect = mysql_connect("localhost", "root", "") or trigger_error(mysql_error(),E_USER_ERROR);
mysql_select_db("test",$connect) or die(mysql_error());
$result=@mysql_query("SELECT passa FROM regsite WHERE usera='".mysql_real_escape_string($_POST['user'])."' AND passa='".mysql_real_escape_string($_POST['pass'])."'");
if ($reg=mysql_fetch_array($result))
{
echo "ok";
}
else
{
echo "Username or Password incorect ! ";
}
?>[/code]
reg.php
Código: Seleccionar todo
<?php
$connect = mysql_connect("localhost", "root", "") or trigger_error(mysql_error(),E_USER_ERROR);
if (!$connect)
die("Could not connect: ".mysql_error());
else{
$db = mysql_select_db("test",$connect) or die(mysql_error());
if(!$db)
die("Could not select database: ".mysql_error());
else
{
if (($_POST['user'] !="") && ($_POST['pass'] !="")) {
$result=@mysql_query("INSERT INTO regsite (usera,passa) VALUES('".mysql_real_escape_string($_POST['user'])."','".mysql_real_escape_string($_POST['pass'])."');");
if ($result)
{
echo "Registe new member ( ".$_POST['user']." ).. ok";
}
else
{
echo "error ..this user exist try with new name! ";
}
}
else
echo "error ..user or pass empty ! ";
}
}
mysql_close($connect);
?>
function php(u,p)
Return = "";
values ={user=u , pass=p}
Return = HTTP.Submit("http://127.0.0.1:8888/rgMySql/view.php", values, SUBMITWEB_POST, 20, 8888, nil, nil);
return Return;
end
download
program with apz ..
[hide]http://www.mediafire.com/?b383uug999u36dc[/hide]
:pc: