Code Comments
Programming Forum and web based access to our favorite programming groups.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"
Post Follow-up to this messageI 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
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.