Registration & Login & Consult [Http/Mysql]

Ejemplos y plantillas para Autoplay Media Studio.
salam & hello
this exemple for login and registration and consultation (view rapport for admin only :) )

Pictures :

login :
Imagen

view rapport !
Imagen

registre
Imagen

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:
Thanks ,I move to examples ams 8
Gracias Puede Ser muy útil... ;)
gracias, me será bastante util
thanks, I will be quite useful
gracias
thanks
to add php or others language use syntax tag.

php text here ¿?=)(/&%$·"º

Código: Seleccionar todo

php text here ¿?=)(/&%$·"º
:friends:
thanks !! muy interesante !!
I love you
pues creo q no esta muy claro como utilizarlo... soy algo nuevo en php y mas en autoplaymedia... me agradaria mas si lo pudieran explicar un poco mas...

saludos
Thanks Bro
exerlente cada vez avansamos mas en el foro
Imagen
thanks
excelente aplicacion
GRACIAS GENTE MUY BUEN APORTE. ESPERO ESTAR APORTANTO MAS ADELANTE YA AUN SOY NUEVO EN ESTE PROGRAMA....
Cool
gracias
necesitooooo
interesante lo chekeare