Página 1 de 4

Registration & Login & Consult [Http/Mysql]

Publicado: 21 Jul 2011 18:57
por minou
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:

Re: Registration & Login & Consult [Http/Mysql]

Publicado: 21 Jul 2011 20:13
por rafaxplayer
Thanks ,I move to examples ams 8

Re: Registration & Login & Consult [Http/Mysql]

Publicado: 21 Jul 2011 20:19
por Thedary
Gracias Puede Ser muy útil... ;)

Re: Registration & Login & Consult [Http/Mysql]

Publicado: 21 Jul 2011 20:43
por er_mejor
gracias, me será bastante util
thanks, I will be quite useful

Re: Registration & Login & Consult [Http/Mysql]

Publicado: 21 Jul 2011 23:27
por xxsolracxx
gracias

Re: Registration & Login & Consult [Http/Mysql]

Publicado: 22 Jul 2011 11:21
por nghethihieu
thanks

Re: Registration & Login & Consult [Http/Mysql]

Publicado: 22 Jul 2011 18:03
por Ceone
to add php or others language use syntax tag.

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

Código: Seleccionar todo

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

Re: Registration & Login & Consult [Http/Mysql]

Publicado: 26 Jul 2011 01:09
por kocx520
thanks !! muy interesante !!

Re: Registration & Login & Consult [Http/Mysql]

Publicado: 02 Ago 2011 01:24
por dangngocnguyenit
I love you

Re: Registration & Login & Consult [Http/Mysql]

Publicado: 02 Ago 2011 05:13
por baby mac
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

Re: Registration & Login & Consult [Http/Mysql]

Publicado: 05 Ago 2011 15:21
por sterio_king
Thanks Bro

Re: Registration & Login & Consult [Http/Mysql]

Publicado: 10 Ago 2011 00:08
por sSantoss
exerlente cada vez avansamos mas en el foro

Re: Registration & Login & Consult [Http/Mysql]

Publicado: 15 Ago 2011 01:34
por erickdj
Imagen

Re: Registration & Login & Consult [Http/Mysql]

Publicado: 17 Ago 2011 23:35
por abood1987
thanks

Re: Registration & Login & Consult [Http/Mysql]

Publicado: 18 Ago 2011 06:57
por ivanfer2011
excelente aplicacion

Re: Registration & Login & Consult [Http/Mysql]

Publicado: 30 Ago 2011 07:13
por jaynor
GRACIAS GENTE MUY BUEN APORTE. ESPERO ESTAR APORTANTO MAS ADELANTE YA AUN SOY NUEVO EN ESTE PROGRAMA....

Re: Registration & Login & Consult [Http/Mysql]

Publicado: 01 Sep 2011 20:17
por Phaelitico
Cool

Re: Registration & Login & Consult [Http/Mysql]

Publicado: 05 Sep 2011 21:53
por bumbo
gracias

Re: Registration & Login & Consult [Http/Mysql]

Publicado: 22 Sep 2011 15:44
por fnavarro
necesitooooo

Re: Registration & Login & Consult [Http/Mysql]

Publicado: 22 Sep 2011 19:27
por jaimevega
interesante lo chekeare