Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: [PEAR] MD5 & Auth class
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 = "jig";
$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"

Report this thread to moderator Post Follow-up to this message
Old Post
Chris Ilias
09-01-04 01:56 AM


Re: [PEAR] MD5 & Auth class
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:
>
> 
>
> 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

Report this thread to moderator Post Follow-up to this message
Old Post
Pahlevanzadeh Mohsen
09-01-04 01:56 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Pear archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:57 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.