Issue
I was trying to set up a signin/signup section on my website and I found a website with codes that satisfy my target. These are the website files. Anyway, in one of the files called function.php, an error blocking me from achieving my target.
Here's the part of the code that is causing the problem:
$Pass = md5($Password);
$Validation_Code = md5($UserName+microtime());
$filename = './JS/main.js';
$filename2 = './JS/jQuery.js';
if (file_exists($filename) && file_exists($filename2)) {
$sql = "insert into users (FirstName,LastName,UserName,Email,Password,Validation_Code,Active) values ('$FirstName','$LastName','$UserName','$Email','$Pass','$Validation_Code','0')";
$result = mysqli_query($con,$sql);
}
else {
header("location:https://www.onlineittuts.com");
}
Specifically this part is causing the problem:
$Validation_Code = md5($UserName+microtime());
Can somebody tell me what is the issue and how I can solve it?
Solution
Are you trying to concat strings? If yes then you should use a dot like this
$Validation_Code = md5($UserName . microtime());
The plus is a mathematical operator.
Answered By - Pingu69
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.