Hi...
My problem is that i can't store info in a mysql database... ex:
I want to store this info in my database: login/passwd and i have the php
code...
<?
$logintxt = $HTTP_POST_VARS['logintxt'];
$passwdtxt= $HTTP_POST_VARS['passwdtxt'];
if (!$logintxt || !$passwdtxt)
{
include('registo.htm');
}
else
{
$ligacao=mysql_connect("localhost","","");
if (!$ligacao)
{
print("Problemas na liga��o � base de dados!");
}
else
{
//Procurar se user j� existente
//$sql="INSERT into users SET login='$logintxt',
passwd=MD5('$passwdtxt')";
$sql="INSERT INTO users (login,passwd) VALUES ('$logintxt',
'passwd=MD5($passwdtxt))'";
mysql_db_query("mysite",$sql);
}
mysql_close();
}
?>
what i'm doing wrong? : |
thanks...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php