Answer the question
In order to leave comments, you need to log in
MD5 entry in Mysql...?
$name = $username;
$email = $params['password']; //так все сохраняет
///////////////////////////////////////
//$email = md5($params['password']);//А если сделать так - пароль не сохраняется вообще(собственно, при выполнении скрипта в ответ тишина, может и имя не сохраняется)
///////////////////////////////////////$query = "INSERT INTO $userstable VALUES('$name','$email', '$preference')";
Answer the question
In order to leave comments, you need to log in
Using code like this
$query = "INSERT INTO $userstable VALUES('$name','$email', '$preference')";
you must be sure that the first three fields of the $usertable must be name, email and preference, the rest must have default values. This is first. Secondly, it is bad practice to write queries with inserting variables directly into the query string (read about SQL injections). Thirdly, apparently - instead of $email = md5($params['password'])
expected $password = md5($params['password'])
. Fourth, how can a password be saved if you don't insert it into the database at all?
full code of the form and handler in the studio and what comes in the request there
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question