Greetings to All,
I am having difficulty in 'md5'ing a $var in a function before it is
placed into the ("INSERT INTO table...

The whole point is I don't want the MySQL DB logs showing my $var's
password and username 'before' it is encrypted by MySQL's md5.

When MySQL receives PHP's encrypted $var the log shows query INSERT with
the 32 bits but it is not inserted into the DB.

MySQL will not accept the $var's in the code that is commented out.
It shows no errors by the way.
MySQL accepts what is shown, but this is not as I explained what I want.
Thanks In Advance,

 mysql_query("CREATE TABLE IF NOT EXISTS docproedit (
              id int(11) NOT NULL auto_increment,
              username BLOB NOT NULL default '',
              password BLOB NOT NULL default '',
              TimeEnter timestamp,
              PRIMARY KEY (id)
              ENGINE=MyISAM;")or die('Create Died' . mysql_error());

$db_name='aims site';
$con = mysql_connect($db_server,$db_user,$db_pass) or die(mysql_error());
$q=mysql_select_db($db_name, $con) or die(mysql_error());

function addNewUser($username,$password){
global $q;
global $tbl_name;
global $con;
//mysql_query("INSERT INTO $tbl_name
mysql_query("INSERT INTO $tbl_name
return mysql_query($q,$con);

echo "<h2>New User Added!</h2>";

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to