Re: MD5 & Auth class
| From: | Pahlevanzadeh Mohsen | Date: | Tue, 31 Aug 2004 23:38:13 +0000 |
| Subject: | Re: MD5 & Auth class | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-14356@lists.php.net to get a copy of this message | ||
I have tested your code.But i didnt see okkkkkkkk.
Therefore your code is false.
My new code was:
<?
set_include_path(get_include_path().'/'.'auth');
include_once('Auth/Auth.php');
function x(){echo "xxxxxxxxxxxxxxxxxxx";}
mysql_pconnect('localhost',"root",'');
mysql_select_db('mem');
$us = "jiq";
$pa = "mohsen";
$sql = "INSERT INTO usernames(user,pass)
VALUES('$us',MD5('$pa'))";
mysql_query($sql);
$parameterforauth=array("dsn"=>"mysql://jiq:mohsen@1.1.1.1/mem",
"table"=>"usernames",
"usernamecol"=>"user",
"passwordcol"=>"pass");
$ptr_auth_C=new auth("DB",$parameterforauth,"x");
$ptr_auth_C->start();
if ($ptr_auth_C->getAuth())
echo "okkkkkkkkkkkkkkk";
//echo $pass." ".$user;
?>
Please guide me......
--- Chris Ilias <mist@uep.at> wrote:
> Pahlevanzadeh Mohsen wrote:
>
>
> > set_include_path(get_include_path().'/'.'auth');
> > include_once('Auth/Auth.php');
> > function x(){echo "xxxxxxxxxxxxxxxxxxx";}
> > mysql_pconnect('localhost',"root",'');
> > mysql_select_db('mem');
> > $x=MD5('mohsen');
> > mysql_query("insert into usernames values
> > (pass='$x',user = 'jiq');");
>
> are the date correctly inserted into the database??
> i think there is a problem with a false
> sql-statement
> the sql table should have a id field which should be
> the primary key
>
> <code>
> $user = "jiq";
> $pass = "mohsen";
> $sql = "INSERT INTO usernames(user,pass) VALUES
> ('$user',MD5('$pass'))";
> mysql_query($sql);
> </code>
>
> i use the md5 function of sql in this example
> greetz chris
>
>
>
> --
> ---//---//---//---//---//---//---//---//---//---//
> Christoph Ilias email: mist@uep.at
> -------------------------------------------------
> "Die meisten Probleme sitzen vor dem Bildschirm"
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
=====
---------DIGITAL SIGNATURE-------------------
///Mohsen Pahlevanzadeh////////
Network administrator & programmer
My home phone is: +98213810146
My email address is
m_pahlevanzadeh at yahoo dot com
My website is: http://webnegar.net
----------------------------------------------------------------
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail